因为微信返回的xml格式因此要解析php
$result = file_get_contents('php://input', 'r'); $data = json_decode(json_encode(simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA)), true);json
这样咱们输出一下就是对象了微信
接受成功后要通知微信接受成了code
echo 'success';xml