always_populate_raw_post_data报错

问题

当你在维护项目时候遇到如下问题:
always_populate_raw_post_data报错,提示不建议使用$HTTP_RAW_POST_DATA

Invalid JSON:
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

Warning: Cannot modify header information - headers already sent in Unknown on line 0

方法

1 通过修改php.ini配置文件:


image.png

2 或者直接升级到php7,官方说明: 点我打开

image.png

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容