/**
* 将xml转为array
* @param string $xml
*/
public function xml_for_arr($xml)
{
if(!$xml){
return "xml数据异常!";
// return FALSE;
}
//将XML转为array
//禁止引用外部xml实体
libxml_disable_entity_loader(TRUE);
return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), TRUE);
}
搭个在线协作工具:Peerloom
Peerloom:搭个在线协作室 十一假期,给自己折腾了一个在线协作工 阅读更多
0 条评论