【问题标题】:PHP RSS parser - - not workingPHP RSS 解析器 - - 不工作
【发布时间】:2015-12-07 20:28:22
【问题描述】:

您好,我正在解析此提要,但似乎无法正常工作

<?php
$url = "http://insite.unthsc.edu/dailynews/category/campus-news/feed/";
$xml = simplexml_load_file($url);
print_r($xml);
?>

当我输出 pre 时,我目前得到 this 我以前为其他提要和 xml 文件做过这个,但我一生都无法弄清楚为什么这次它不起作用。

谢谢

【问题讨论】:

    标签: php wordpress xml-parsing rss


    【解决方案1】:

    问题就在错误信息中:您需要在加载 XML 资源之前验证

    在隐身窗口中打开the link,或

    curl http://insite.unthsc.edu/dailynews/category/campus-news/feed/
    

    你会看到 PHP 看到了什么。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-04
      • 1970-01-01
      相关资源
      最近更新 更多