PHP 5.6 中 Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version


在使用數組轉換為XML 時,出現這種錯誤

Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version。

特別是在微信開發的時候,字符串轉換成XML時,有可能導致這種問題。

 

解決方法一

找到php.ini  文件, 把always_populate_raw_post_data  修改為-1 就行了。

always_populate_raw_post_data=-1

 

解決方案參見:https://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/

 

解決方案二:

在 php.ini  466行處 設置 display_errors = Off ,這樣在出現警告的時候, 可以不顯示警告信息。順利解決問題。

 

個人博客:http://www.luoyangwyb.net/ 


免責聲明!

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



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