我切换到PHP 5.6.0,现在到处都收到以下警告:
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
Run Code Online (Sandbox Code Playgroud)
好吧,我依靠一些不赞成的功能.除了我没有!
phpinfo()
显示我已always_populate_raw_post_data
设置为0(禁用).那么发生了什么?我不想通过将此值设置为-1来"避免警告".这只会隐藏警告,我仍然会弃用配置.我想从源头解决问题,并知道为什么PHP认为HTTP_RAW_POST_DATA
填充是打开的.