php5.6版本部分ajax错误HTTP_RAW_POST_DATA is deprecated头部错误原因
打网站显示错误:
Uncaught SyntaxError: Unexpected token < in JSON at position 0
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
Uncaught exception 'think\exception\ErrorException' with message 'include(): Filename cannot be empty' in
引用JSON数据显示不出来
解决办法:
打开php.ini配置文件,找到以下代码
;always_populate_raw_post_data = -1
改成
always_populate_raw_post_data = -1
参考:
https://blog.csdn.net/qq_34489091/article/details/80053594?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task
https://blog.csdn.net/Xiao_peng117/article/details/88672828