这个 RSS feed 应该有效吗?

发布于 2024-11-30 14:58:58 字数 1067 浏览 0 评论 0原文

我在本地环境中制作一个网站。我无法让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风筝有风,海豚有海 2024-12-07 14:58:58

如果您将该文件存储在本地硬盘上并使用 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.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文