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


運行PHP項目時,一直彈出這個提示

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.ini文件下:開啟always_populate_raw_post_data = -1 之后保存重啟即可

原因:開啟后就可以用 $HTTP_RAW_POST_DATA 接收data,不過通常我們使用 php://input


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM