PHP 5.6中Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a futur
浏览量:361
本地版本PHP5.6.报了一堆错误,如下
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 0
仔细了解一下,在使用数组转换为XML 时,出现这种错误,特别是在微信开发的时候,字符串转换成XML时,有可能导致这种问题。
原因:php5.6已经废除了 这个函数了!
解决方法:
找到php.ini 文件, 把always_populate_raw_post_data 修改为-1 就行了。
always_populate_raw_post_data=-1
别忘了重启服务器哦,负责改完不生效。
神回复
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。