文件操作 - unserializeWithAttributes.php
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/cpanel-php84-xml-serializer/examples/unserializeWithAttributes.php
编辑文件内容
<?PHP /** * This example shows how to parse attributes from * XML tags. * * @author Stephan Schmidt <schst@php.net> * @uses example.xml */ error_reporting(E_ALL); require_once 'XML/Unserializer.php'; $options = array( XML_UNSERIALIZER_OPTION_ATTRIBUTES_PARSE => true, XML_UNSERIALIZER_OPTION_ATTRIBUTES_ARRAYKEY => false ); // be careful to always use the ampersand in front of the new operator $unserializer = &new XML_Unserializer($options); // userialize the document $status = $unserializer->unserialize('example.xml', true); if (PEAR::isError($status)) { echo 'Error: ' . $status->getMessage(); } else { $data = $unserializer->getUnserializedData(); echo '<pre>'; print_r($data); echo '</pre>'; } ?>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件