【问题标题】:This XML file does not appear to have any style information associated with it此 XML 文件似乎没有任何与之关联的样式信息
【发布时间】:2013-05-14 16:44:03
【问题描述】:

尝试在使用 Dreamweaver 和 PHP 进行开发的网站上工作。

在直播现场,突然发现这个错误:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>
ABCDED
</title>
<cf:treatAs xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005">list</cf:treatAs>
<link>http://events.sjsu.edu/default.aspx</link>
<description>RSS Feed ABCD Events Calendar</description>
</channel>
</rss>

【问题讨论】:

  • 你打开了RSS频道...
  • 什么原创内容?这是一个 RSS 提要。它是为使用 RSS 查看器而非网络浏览器而设计的。
  • 这不是错误。这是一条信息消息,告诉您 XML 文件似乎没有任何与之关联的样式信息。为什么你认为这是一个错误?

标签: php xml rss dreamweaver


【解决方案1】:

实际上,是在将 XML 文件回显到 PHP 页面中吗?

$xml = simplexml_load_file('URL');
  foreach ($xml->channel->channel as $value){ 
    $var1 = $value->link;
    $var2 = $value->description;
} 
echo $var1."<br>".$var2;

在 php 中显示。

希望它有效!

【讨论】:

  • 我的问题是应该显示的页面没有显示。相反,会显示此 RSS 提要。我该如何纠正?
  • @Anan 看到你打开的网址了吗?还是显示?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-11-04
  • 2017-11-28
  • 2012-07-08
  • 1970-01-01
  • 2013-01-26
  • 1970-01-01
相关资源
最近更新 更多