php的AJAX返回值开头是<meta http-equiv=Content-导致解析错误

WBOY
Release: 2016-06-23 13:32:14
Original
953 people have browsed it

php的AJAX返回值开头是

然后导致解析错误,无法解析,正常应该没有上面这个meta头部,何解啊?

提示解析错误:


收到的AJAX的返回值:


回复讨论(解决方案)

显然是你的代码写错了

贴出ajax代码看下,如果返回是json请设置文件编码utf-8无bom

你的php页面写了HTML代码吧,把那句改成 header("content-type:text/html;charset=utf-8"); 试试。

谢谢各位,问题已解决,是没注意细节

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template