<分区>
Possible Duplicate:
The right JSON content type?
你好
如果我使用 json_encode(...)
在 ajax 请求中发送一些内容,我应该使用 header()
设置什么“内容类型”?和 HTML 一样吗? (文本/html)
这个设置会以任何方式影响网站吗?
<分区>
Possible Duplicate:
The right JSON content type?
你好
如果我使用 json_encode(...)
在 ajax 请求中发送一些内容,我应该使用 header()
设置什么“内容类型”?和 HTML 一样吗? (文本/html)
这个设置会以任何方式影响网站吗?
最佳答案
见 What is the correct JSON content type?
正确的内容类型是: 应用程序/json
关于php - AJAX - 什么内容类型应该有 JSON 编码的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4717448/