php文件显示xml样式的文件,是如何完成的?

WBOY
Release: 2016-06-13 12:13:38
Original
754 people have browsed it

php文件显示xml样式的文件,是怎么完成的??
先说一下,不是外链。
用去哪儿的api,那边给了个例子,http://tuan.cctcct.com/interface/xml/team_list.asp
感觉很奇怪,他asp的怎么显示出来是xml呢?php要如何才能做到这样呢?
这个文件里面有很多list,拿其中一条来说:http://tuan.cctcct.com/interface/xml/team_detail.asp?team_id=1562
后面接有id直接就可以生成了,不需要针对每个去生成一个xml文件,这样就方便多了。
谢谢了。
------解决思路----------------------

<br />header('Content-Type:text/xml');<br />header('Charset=utf-8');<br />
Copy after login


然后把xml echo出来即可。

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