合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
``` /* xml转成数组 */ function xmlstr_to_array($xmlstr){//xml字符串转数组 $ob= simplexml_load_string($xmlstr,'SimpleXMLElement', LIBXML_NOCDATA);//将字符串转化为变量 $json = json_encode($ob);//将对象转化为JSON格式的字符串 $configData = json_decode($json, true);//将JSON格式的字符串转化为数组 return $configData; } ```