z
t
点击提交 首先url是能访问你的我想知道有什么办法可以检测到 微信服务器给我发了什么 我好调试点
走同样的路,发现不同的人生
What the WeChat server sends you is a data stream. The code can be written like this
$postStr = file_get_contents('php://input'); $logFile = date('Y-m-d').'wechatPost.log'; file_put_contents($logFile,$postStr,8); //去日志文件里查看
Write statements in wechat.php and store all received parameters in the database $xml = $GLOBALS['HTTP_RAW_POST_DATA'];This can be used to receive xml data received by the server.
Look at WeChat’s documentation https://mp.weixin.qq.com/wiki
What the WeChat server sends you is a data stream. The code can be written like this
Write statements in wechat.php and store all received parameters in the database
$xml = $GLOBALS['HTTP_RAW_POST_DATA'];
This can be used to receive xml data received by the server.
Look at WeChat’s documentation https://mp.weixin.qq.com/wiki