vendor_user/uc_client/lib/xml.class.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
[UCenter] (C)2001-2099 Comsenz Inc.
This is NOT a freeware, use is subject to license terms
$Id: xml.class.php 1059 2011-03-01 07:25:09Z monkey $
*/
function xml_unserialize(&$xml, $isnormal = false)
{
$xml_parser = new XML($isnormal);
$data = $xml_parser->parse($xml);
$xml_parser->destruct();
return $data;
}
function xml_serialize($arr, $htmlon = false, $isnormal = false, $level = 1)
{
$s = 1 == $level ? "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n<root>\r\n" : '';
$space = str_repeat("\t", $level);
foreach ($arr as $k => $v) {
if (!is_array($v)) {
$s .= $space."<item id=\"$k\">".($htmlon ? '<![CDATA[' : '').$v.($htmlon ? ']]>' : '')."</item>\r\n";
} else {
$s .= $space."<item id=\"$k\">\r\n".xml_serialize($v, $htmlon, $isnormal, $level + 1).$space."</item>\r\n";
}
}
$s = preg_replace("/([\x01-\x08\x0b-\x0c\x0e-\x1f])+/", ' ', $s);
return 1 == $level ? $s.'</root>' : $s;
}
class XML
{
public $parser;
public $document;
public $stack;
public $data;
public $last_opened_tag;
public $isnormal;
public $attrs = array();
public $failed = false;
public function __construct($isnormal)
{
$this->XML($isnormal);
}
public function XML($isnormal)
{
$this->isnormal = $isnormal;
$this->parser = xml_parser_create('ISO-8859-1');
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
xml_set_object($this->parser, $this);
xml_set_element_handler($this->parser, 'open', 'close');
xml_set_character_data_handler($this->parser, 'data');
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。