重新搭建了一个php运行环境,发现运行项目时报如下错误:
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
查找原因后,发现错误原因如下:
官方在php5.6就把$http_raw_post_data废弃了,而且在php7中把它移除了。因为这个参数影响性能,所以要废弃掉,官方建议用php://input来代替。
解决办法:
修改php.ini
always_populate_raw_post_data = -1
如对本文有疑问, 点击进行留言回复!!
thinkphp5 + ajax 使用formdata提交数据(包括文件上传) 后台返回json完整实例
使用Entrust扩展包在laravel 中实现RBAC的功能
网友评论