微信公众号知识碎片(一)

一.xml数据处理

$xml= file_get_contents('php://input'); //接收xml数据

$objectxml = simplexml_load_string($xml);//将文件转换成 对象

$xmljson= json_encode($objectxml );//将对象转换个JSON

$xmlarray=json_decode($xmljson,true);//将json转换成数组

猜你喜欢

转载自blog.csdn.net/weixin_41591151/article/details/81142706
今日推荐