在你要输出的xml前边加      
header("Content-type:text/xml;charset=utf-8");
这个上边不要有任何输出

打印用echo 别用var_dump print_r之类的。。。

 

顺手记录下xml转数组

$xml = simplexml_load_string($data,NULL,LIBXML_NOCDATA);
$array=json_decode(json_encode($xml),true);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案