这个 RSS feed 应该有效吗?
我在本地环境中制作一个网站。我无法让 RSS 提要正常工作,但我认为这可能是由于我的本地环境而不是代码问题。出于诊断目的,我决定使用维基百科中的代码:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Title</title>
<description>This is an example of an RSS feed</description>
<link>http://www.someexamplerssdomain.com/main.html</link>
<lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
<item>
<title>Example entry</title>
<description>Here is some text containing an interesting description.</description>
<link>http://www.wikipedia.org/</link>
<guid>unique string per item</guid>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
</item>
</channel>
</rss>
该代码位于名为 feed.feed 的文件中。当我在浏览器中导航到该文件并使用谷歌阅读器查看它时,我收到消息“找不到所请求的提要”。代码是否正确?这是否意味着我的环境设置存在问题? 谢谢
Im making a website on a local environment. Im having trouble getting an RSS feed to work, but I think it may be due to my local environment not an issue with the code. For diagnostic purposes I decided to use the code from wikipedia:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Title</title>
<description>This is an example of an RSS feed</description>
<link>http://www.someexamplerssdomain.com/main.html</link>
<lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
<item>
<title>Example entry</title>
<description>Here is some text containing an interesting description.</description>
<link>http://www.wikipedia.org/</link>
<guid>unique string per item</guid>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
</item>
</channel>
</rss>
This is in a file called feed.feed. When I navigate to the file in a browser and view it with google reader I get the message 'The feed being requested cannot be found'. Is the code correct and does this defiantly mean its an issue with my environment set up?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您将该文件存储在本地硬盘上并使用
file:
URL 导航到该文件,Google 阅读器当然无法访问该文件。他们需要将提要发布在网络上的某个地方;他们没有能力通过网络侵入您的本地 PC 并获取您的文件(或者,至少,他们不会透露他们拥有这种能力只是为了向您显示 RSS 提要。)If you're storing the file on your local hard drive and navigating to it with a
file:
URL, of course Google Reader can't access it. They need the feed to be published on the web somewhere; they don't have the ability to hack your local PC over the network and fetch your files (or, at least, they're not going to reveal that they have do this ability simply to display RSS feeds for you.)