我用以下php下载http://www.6rooms.com/rss.php是出以下错
(XML  文档只能有一个顶层元素。处理资源  'http://mp3.zhongsou.com/test/thx.php?url=http://www.6rooms.com/rss.php'  时出错。第  2  行,位置:  2    
 
<b>Warning</b>:    file_get_contents(http://www.6rooms.com/rss.php):  failed  to  open  stream:  HTTP  request  failed!  H...)
但是下载其他页面没有问题  
 
<?  
header("Content-Type:  application/xml");  
$strurl  =  $_GET["url"];    
$str  =  file_get_contents($strurl);  
echo  $str;  
?>

解决方案 »

  1.   

    XML  文档只能有一个顶层元素
    'http://mp3.zhongsou.com/test/thx.php?url=http://www.6rooms.com/rss.php'
    解析人家的xml??????????
      

  2.   

    人家的xml是没有问题的阿
      

  3.   

    header("Content-Type:  application/xml");  ----------------------------------
    header("Content-Type:  text/xml");
      

  4.   

    header("Content-Type:  text/xml");我已经试过了还是不行啊