xajax:Error: the XML response that was returned from the server is invalid. xml处理指令不在外部实体的开始部分位置

这几天调试xajax,总是报错Error: the XML response that was returned from the server is invalid.
在firefox的错误控制台中,提示:xml处理指令不在外部实体的开始部分位置
经过反复的调试,最后发现原来是<?php ?> 后面多了一个空格,导致了ajax的responseXml前面也多了一个空格,
从而导致了xml错误。
总结:
<?php ?>文件后不要有空格,特别是当其作为文件被别的文件include时,容易产生错误,而且这种错误极其难调试。

posted @ 2008-04-03 15:17  Donal  阅读(1643)  评论(0编辑  收藏  举报