【发布时间】:2013-11-09 05:41:26
【问题描述】:
所以我目前正在获取此 RSS 提要 http://www.footballwebpages.co.uk/league.xml?comp=1 ,但根元素不受支持,因此我需要在 XML 文件的底部/顶部添加一个 <rss> 标记。我该怎么做呢?我已经设法在这里打印出来了……
<?php
header("Content-type: application/xhtml+xml");
$html = file_get_contents('http://www.footballwebpages.co.uk/league.xml?comp=1');
echo $html;
?>
除了底部和顶部的 <rss> 标记之外,它为我提供了正确的所有内容。
【问题讨论】: