第一种
header('Content-type: application/json');
另一种
header('Content-type: text/json');
登录后复制
登录后复制

这两种有什么使用上的区别吗?

回复内容:

第一种
header('Content-type: application/json');
另一种
header('Content-type: text/json');
登录后复制
登录后复制

这两种有什么使用上的区别吗?

http://stackoverflow.com/questions/47...

application/json是更通用且符合标准的

application/json,这是标准 RFC 4672

第一种是标准兼容以后,第二种兼容IE6

IE6害死人系列

09-13 23:12