功能说明
众所周知,RSS是网站的简易信息聚合,在这次lighttp引擎的更新中,修复了细节的不规范问题。
rss.php
第16行至44行更新如下
echo '<?xml version="1.0" encoding="utf-8"?> <rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"> <channel> <title><![CDATA[' . Option::get('blogname') . ']]></title> <description><![CDATA[' . Option::get('bloginfo') . ']]></description> <link>' . $URL . '</link> <atom:link href="https://website.lighttp/rss.php" rel="self" type="application/rss+xml"/> <language>zh-cn</language> <generator>website.lighttp</generator>' ; if (!empty($blog)) { $user_cache = $CACHE->readCache('user'); foreach ($blog as $value) { $link = Url::log($value['id']); $abstract = str_replace('[break]', '', $value['content']); $pubdate = date('r', $value['date']); $author = $user_cache[$value['author']]['name']; doAction('rss_display'); echo <<< END <item> <title>{$value['title']}</title> <link>$link</link> <description><![CDATA[{$abstract}]]></description> <pubDate>$pubdate</pubDate> <dc:creator>webmaster@website.lighttp ($author)</dc:creator> <guid>$link</guid> </item>
更新作者: 丁程