Home > Backend Development > PHP Tutorial > 相干echo的返回值

相干echo的返回值

WBOY
Release: 2016-06-13 10:34:47
Original
995 people have browsed it

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

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

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

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

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

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


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