可能重复:
正确的json文件的HTTP标头
我使用以下行设置了php文件的标题:
header('Content-Type', 'application/json');
Run Code Online (Sandbox Code Playgroud)
服务器失败并显示错误消息:
"Tue Oct 23 16:20:09 2012] [error] [client 111.111.111.111] malformed header from script. Bad header=Content-Type: xyz.php, referer:...."
Run Code Online (Sandbox Code Playgroud)
我在网上提出了一些建议,将其添加到.htaccess文件中
AddType application/json .json
Run Code Online (Sandbox Code Playgroud)
两者都没有奏效.如果有任何进一步的帮助,我将不胜感激.
归档时间: |
|
查看次数: |
1186 次 |
最近记录: |