織夢dedecms全站RSS輸出詳細教程,織夢教程
導讀:織夢教程織夢教程首先,你新建一個rss.php文件,把下面的代碼拷貝到其中: ?php require_once (dirname(__FILE__) . /include/c織夢的模板。
首先,你新建一個rss.php文件,把下面的代碼拷貝到其中:
<?php
require_once (dirname(__FILE__) . "/include/common.inc.php");
require_once DEDEINC."/arc.partview.class.php";
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/default/rss.htm");
header("Content-type:application/xml");
$pv-dede,模板>Display();
?>
保存該文件到站點根目錄下。
然后,再制作一個rss.htm模板輸出文件,把下面的代碼拷貝到其中:
<?xml version="1.0" encoding="gb2312" ?>
<rss version="2.0">
<channel>
<title>{dede:global.cfg_webname/}</title>
<link>{dede:global.cfg_basehost/}</link>
<description>{deddede免費校板下戰e:global.cfg_description/}</description>
<language>zh-cn</language>
<generator>{dede:global.cfg_webname/}&ldede后臺模板t;/generator>
<webmaster>{dede:global.cfg_adminemail/}</webmaster>
{dede:arclist row='60' col='1' titlelen='100' orderby='pubdate'}
<item>
<link>http://www.5loveb.com[field:arcurl/]</link>
<title><![CDATA[[field:title function='html2text(@me)'/]]]></title>
<author>[field:writer/]</author>
<category>[field:typename/]</category>
<pubDate>[field:pubdate function='strftime("%a, %d %b %Y %H:%M:%S +0800",@me)'/]</pubDate>
<guid>http://www.5loveb.com[field:arcurl/]</guid>
<description><![CDATA[[field:description function='html2text(@me)'/] ... <br /><b>文章分類</b>:[field:typename/]<br /><a href="http://www.5loveb.com[field:arcurl/]" target="_blank">閱讀全文</a> | <a href="http://www.5loveb.com/plus/recommend.php?aid=[field:id/]" target="_blank">郵件推薦</a> | <a href="http://www.5loveb.com[field:arcurl/]" target="_blank">評論回復</a>]]></description>相關織夢的模板。
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-22 ,文章織夢dedecms全站RSS輸出詳細教程,織夢教程主要講述全站,標簽,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_34400.html