Why does php include statement return whitespace as ajax response

▼魔方 西西 提交于 2019-12-25 01:50:44

问题


An example of my question in the title demonstrates the problem I'm having.

example

sorry don't know how to use jsfiddle.

And how do I fix it?


回答1:


It seems your "empty file" contain an empty line, http://wx2fly.com/test/emptyFile.php , which means it's not empty !

I think you can fix your problem by making your empty (or not) file starts with <?php, and be sure the php tag is NOT closed at the end of the file.



来源:https://stackoverflow.com/questions/16139630/why-does-php-include-statement-return-whitespace-as-ajax-response

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!