Home  >  Article  >  Backend Development  >  php ajax error (if pure js is used, status 4 cannot be returned)

php ajax error (if pure js is used, status 4 cannot be returned)

WBOY
WBOYOriginal
2016-08-08 09:32:121035browse

Recently, when using php + ajax, the same situation as java did not return success or status 4.

Then the reason is very simple. The data returned by using php is not in the standard json format

Please return the json in the standard format! ! !

http://blog.csdn.net/hzz780/article/details/31393513 Modifying js in java returns success

http://blog.csdn.net/hzz780/article/details/ 26611431 In java case, modify java to return success

The above introduces the php ajax error (if pure js is used, status 4 cannot be returned), including the relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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