【发布时间】:2011-09-20 15:40:18
【问题描述】:
目前,我已将 RSS/XML 提要写入数据库,但我想让这些提要公开访问。
例如,对于模块 A,我想要它,因此您可以转到 feed.php?module=A,它会生成一个带有 .xml 文件结尾的提要,例如feed.xml。
来自数据库的示例 XML 代码:
[?xml version="1.0" encoding="UTF-8"?]
[rss version="2.0"]
[channel]
[title]Module news for module A: D&D[/title]
[description]Desc for module here[/description]
[language]en[/language]
[item]
[title]test article[/title]
[pubDate]Tue, 20 Sep 2011 16:14:20[/pubDate]
[description]A test article would go here.[/description]
[link]http://www.google.com[/link]
[author]esujdt[/author]
[guid]http://www.google.com[/guid]
[/item]
[/channel]
[/rss]
任何帮助将不胜感激。
【问题讨论】:
-
这不是 XML...虽然关闭:P
-
为什么有方括号?另外,问题是什么?如果 XML 已经在数据库中,您可以简单地将其与 application/xml 标头一起提供给最终用户吗?请说明您究竟需要什么帮助。
-
哎呀忘了在粘贴之前将它们改回来,它们是方形的,因为它被包含在其他地方的 xml 文件中......长话短说,我不是那个工作的人。它们将在我的提要中倾斜。