您好,欢迎访问一九零五行业门户网

php接收post参数时报错怎么办

php接收post参数时报错的解决办法:首先搜索【php.ini】中 【always_populate_raw_post_data 】;然后将前面的【;】去掉,并重启服务即可。
php接收post参数时报错的解决办法:
php接收postman数据时报错
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
网上查询到的原因是:本地php版本过高,postman发过来的数据用$http_raw_post_data 接收数据时报错,改变$_post的赋值方式就可以
搜索php.ini中 【always_populate_raw_post_data 】
将前面的【;】去掉,重启服务,就可以正常接收了,不过这一块我目前也没有很清楚,为什么在框架中,接收$_post数据并没有这个报错,但是单独的脚本接收数据时却报错
相关免费学习推荐:php编程(视频)
以上就是php接收post参数时报错怎么办的详细内容。
其它类似信息

推荐信息