版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/q541181500/article/details/79329576
$GLOBALS["HTTP_RAW_POST_DATA"] 接收不到消息
判断方法 :
$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
if (isset($postStr)){
file_put_contents(l.log,"1",FILE_APPEND);
} 在日志文件l.log中并不会打印字符“1”
解决方法:
$postStr=file_get_contents("php://input"); 替换 $postStr=$GLOBALS["HTTP_RAW_POST_DATA"] ;