Home  >  Article  >  Backend Development  >  相干echo的返回值

相干echo的返回值

WBOY
WBOYOriginal
2016-06-13 10:34:47905browse

有关echo的返回值。
echo的返回值给ajax用来验证。
发现当

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->echo "a";

时,客户端alert一下,发现是个长度5的数组,前3个为空,第4个为a,最后一个为undefined。

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->echo 1;

时,客户端alert一下,发现是个长度4的数组,前3个为空,第4个为1。

要去除空格后才能匹配。。。请问是什么情况?


------解决方案--------------------
php文件保存为UTF-8无BOM格式。
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