使用微信调试工具时,会发送XML数据包
通过t1.php接收
<?php
header("Content-type:text/html;charset=utf-8");
// echo '$GLOBALS[\'HTTP_RAW_POST_DATA\']接收:<br/>';
// print_r($GLOBALS['HTTP_RAW_POST_DATA']);
// echo '<hr/>';
echo 'php://input接收:<br/>';
$data = file_get_contents('php://input');
print_r(urldecode($data));
以上两种方式都能正常接收XML数据包