使用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
其實這個錯誤很好改,主要是PHP5.6版本去除了$HTTP_RAW_POST_DATA,
修改:打開php.ini,將;always_populate_raw_post_data = -1前面的分好去掉,重啓環境就好