$xml_parser = xml_parser_create();
//判断数据是否为xml类型
if(xml_parse($xml_parser,$access,true)){
xml_parser_free($xml_parser); //释放解析占用的内存
#...
}
if(!is_null(json_decode($access))){ //判断是否为json 数据
#....
}
if(is_array($access)){ //判断数组
#....
}
if(xml_parse($xml_parser,$access,true)){
xml_parser_free($xml_parser); //释放解析占用的内存
#...
}
if(!is_null(json_decode($access))){ //判断是否为json 数据
#....
}
if(is_array($access)){ //判断数组
#....
}