关于PHP输出XML文件的有关问题

WBOY
Release: 2016-06-13 13:25:04
Original
721 people have browsed it

关于PHP输出XML文件的问题
PHP each出xml内容在浏览器上会自动将xml标签隐藏掉

于是我加入了header("Content-type: text/xml");

但是问题出现了,不加入前输出的内容是正常的(查看网页源文件),但是一旦加入header后内容只输出一部分就卡住不输出了

如下:
正常的情况:
?我是猪我是猪我是猪我是猪我是猪我是猪我是猪我是猪

加入header后:
我是猪我是猪我是猪我是<br><br>内容就卡住了<br><br><font color="#e78608">------解决方案--------------------</font><br> 会不会是你的笔记本上的php环境和服务器上的不一致啊!检查下吧! <div class="clear"> </div>

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!