织梦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>相关织梦的模板。
首先,你新建一个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输出详细教程,织梦教程主要讲述全站,标签,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_34400.html

 
     
           
           
           
           
           
           
  
  
  
  
 