微信接收推送事件消息时出现 且php版本5.6.31 iis7的服务器php
原先代码接收微信推送消息用 $GLOBALS['HTTP_RAW_POST_DATA']服务器
结果后台php日志报错 微信
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0post
Deprecated 中文释义:过期的
显然你的 php 版本比较高
在高版本 php 的发版说明中都有 $HTTP_RAW_POST_DATA 即将(已经)取消,请改用从 php://input 中读取 的声明
设原来是 $s = $HTTP_RAW_POST_DATA;
应写做 $s = file_get_contents('php://input');this
$HTTP_RAW_POST_DATA 这个被废弃了,在未来的php版本中还会移除。
让你用 php://input 代替spa
其它备注:顺便看看 php.in配置文件always_populate_raw_post_data前面的分号是否是没去掉 always_populate_raw_post_data = -1日志
记得重启PHP服务事件