XML Parsing Error: no element found
Location: http://localhost/rss/
Line Number 1, Column 1:
但是,当我将 xml 粘贴到http://validator.w3.org/feed/check.cgi时,它说没有格式错误。
完整代码如下:
索引.php
<?php
header("Content-Type: application/xml; charset=ISO-8859-1");
$details = '<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>hehe</title>
<link>http://www.google.com</link>
<description>gaga</description>
</channel>
</rss>
';
echo $details;
?>