Home > Backend Development > PHP Tutorial > php RSS格式问题

php RSS格式问题

WBOY
Release: 2016-06-06 20:19:44
Original
1348 people have browsed it

已经解决了,不过不太清楚细节

最近需要将内容输出成RSS,碰到问题是,输出了标题和还有摘要还有内容,但是在网易云阅读里,原文内容读不出来,只能显示标题、摘要、时间这些。

具体输出的XML格式如下:

<code><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>

</title>
<description>

</description>
<link>网址
<language>zh_CN</language>
<pubdate>2016-01-21 14:23:57</pubdate>
<lastbuilddate>2016-01-21 14:23:57</lastbuilddate>
<generator>YBlog RSS Generator</generator>
<ttl>5</ttl>
<image>
<title>

</title>
<link>RSS标题网址
<url>http://www.xxxxx.com/images/logo_rss.png</url>
</image>
<item>
<title>

</title>
<link>
http://www.xxx.com/1231

<description>

</description>
<pubdate>2016-01-21 12:14:28</pubdate>
<encoded>

</encoded>
</item></channel></rss></code>
Copy after login
Copy after login

回复内容:

已经解决了,不过不太清楚细节

最近需要将内容输出成RSS,碰到问题是,输出了标题和还有摘要还有内容,但是在网易云阅读里,原文内容读不出来,只能显示标题、摘要、时间这些。

具体输出的XML格式如下:

<code><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>

</title>
<description>

</description>
<link>网址
<language>zh_CN</language>
<pubdate>2016-01-21 14:23:57</pubdate>
<lastbuilddate>2016-01-21 14:23:57</lastbuilddate>
<generator>YBlog RSS Generator</generator>
<ttl>5</ttl>
<image>
<title>

</title>
<link>RSS标题网址
<url>http://www.xxxxx.com/images/logo_rss.png</url>
</image>
<item>
<title>

</title>
<link>
http://www.xxx.com/1231

<description>

</description>
<pubdate>2016-01-21 12:14:28</pubdate>
<encoded>

</encoded>
</item></channel></rss></code>
Copy after login
Copy after login

已经解决了,在头部加入 xmlns这些就可以了。但是具体含义不太清楚。

<code><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">  </rss></code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template