php 生成xml

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:33:29806browse

通过header()函数来定义输出的文件为xml文件

即:

header('Content-Type:text/xml');
echo "";
echo "";
echo "PHP";
echo "
";
?>

注:xml是一个对文法要求非常严格的语言,所以header()和第一句echo "";必须严格按照这样输出,除了GB2312可以换成其他的编码格式之外,其他的地方一点都不能改

Statement:
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