鍟嗕笜鍋氱恫(w菐ng)绔橠edeCMS瀹氭檪(sh铆)鑷嫊(d貌ng)鐢熸垚绔欓粸(di菐n)鍦板湒sitemap.xml鐨勫(sh铆)鐝�(xi脿n)鏂规硶
鐧�(f膩)甯冩檪(sh铆)闁擄細2018-04-13 13:38 渚�(l谩i)婧愶細 浣滆€咃細admin 榛�(di菐n)鎿婃暩(sh霉)锛氭
DedeCMS瀹氭檪(sh铆)鑷嫊(d貌ng)鐢熸垚绔欓粸(di菐n)鍦板湒sitemap.xml鐨勫(sh铆)鐝�(xi脿n)鏂规硶
绗竴姝�銆侀鍏堝湪妯℃澘鐩寗鏀句竴鍊�(g猫)sitemap.xml鐨勬ā鏉挎枃浠讹紝鏂囦欢鐨勫収(n猫i)瀹瑰涓嬶細
01 |
<?xml version= "1.0" encoding= "UTF-8" ?> |
05 |
<lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate} |
06 |
[field:pubdate function =strftime( '%Y-%m-%d' ,@me)/] |
07 |
{/dede:arclist}</lastmod> |
08 |
<changefreq>daily</changefreq> |
09 |
<priority>1.0</priority> |
11 |
{dede:channel row= '10' type = 'top' } |
13 |
<loc>[field:typelink /]</loc> |
14 |
<changefreq>daily</changefreq> |
15 |
<priority>0.8</priority> |
18 |
{dede:arclist row=1000 orderby=pubdate} |
20 |
<loc>[field:arcurl/]</loc> |
21 |
<lastmod>[field:pubdate function =strftime( '%Y-%m-%d' ,@me)/]</lastmod> |
22 |
<changefreq>monthly</changefreq> |
|
绗簩姝ャ€佹墜鍕�(d貌ng)瀵竴鍊�(g猫)瑷�(j矛)鍔冧换鍕�(w霉)鍩�(zh铆)琛屾枃浠讹紝灏囪┎鏂囦欢鍛藉悕鐐篻enerate_sitemap.php锛屾斁鍦�/plus/task鐩寗閲�锛屾枃浠剁殑鍏�(n猫i)瀹瑰涓嬶細
02 |
//瀹氭檪(sh铆)鐢熸垚缍�(w菐ng)绔欏湴鍦� |
03 |
require_once( dirname (__FILE__). '/../../include/common.inc.php' ); |
04 |
include(DEDEINC. "/arc.listview.class.php" ); |
08 |
$lv->PartView = new PartView($lv->TypeID, false ); |
09 |
$lv->PartView->SetTypeLink($lv->TypeLink); |
10 |
$lv->PartView->SetTemplet(DEDETEMPLATE. '/2012/sitemap.xml' ); |
11 |
$html = $lv->PartView->GetResult(); |
12 |
file_put_contents( '../../sitemap.xml' ,$html); |
|
绗笁姝�銆佸湪绻斿あ(m猫ng)鍚庤嚭(t谩i)娣诲姞瑷�(j矛)鍔冧换鍕�(w霉)锛岀郴绲�(t菕ng)——瑷�(j矛)鍔冧换鍕�(w霉)绠$悊——澧炲姞鏂颁换鍕�(w霉)锛�
浠诲嫏(w霉)鍚嶇ū锛氬畾鏅�(sh铆)鐢熸垚缍�(w菐ng)绔欏湴鍦�
閬�(y霉n)琛岀▼搴忥細generate_sitemap.php
鍩�(zh铆)琛屾檪(sh铆)闁撹嚜宸辨牴鎿�(j霉)闇€瑕侀€�(j矛n)琛岄仼鐣�(d膩ng)?sh霉)鑴慜(sh猫)缃�
鍏跺畠閬搁爡(xi脿ng)榛樿獚(r猫n)鍗冲彲銆�
绗洓姝ャ€佸湪妯℃澘鐩寗鐨刦oot.hml鏂囦欢鎴栧叾浠栧叕鍏辨ā鏉縤nclude鏂囦欢鐨刡ody妯�(bi膩o)绨界祼(ji茅)鏉熶箣鍓嶅姞涓婁唬纰煎悗鐢熸垚鍏ㄧ珯鍗冲彲銆�
娣诲姞瀹屾垚鍚庣恫(w菐ng)绔欑敤鎴跺湪瑷�(j矛)鍔冧换鍕�(w霉)瑕�(gu墨)瀹氱殑鏅�(sh铆)闁撳収(n猫i)鐎忚涓€涓嬬恫(w菐ng)闋�(y猫)灏卞彲浠ヨЦ鐧�(f膩)瑷�(j矛)鍔冧换鍕�(w霉)鏂囦欢鐨勫煼(zh铆)琛岋紝灏卞彲浠ヨ嚜鍕�(d貌ng)鐢熸垚涓€娆itemap.xml锛屽鏋滀笂娆¢亱(y霉n)琛屾檪(sh铆)闁撶殑鏅�(sh铆)闁撴甯稿氨璀夋槑瀹氭檪(sh铆)浠诲嫏(w霉)鍩�(zh铆)琛屾垚鍔熶簡銆�
[鍟嗕笜鍋氱恫(w菐ng)绔橠edeCMS瀹氭檪(sh铆)鑷嫊(d貌ng)鐢熸垚绔欓粸(di菐n)鍦板湒sitemap.xml鐨勫(sh铆)鐝�(xi脿n)鏂规硶]
鏈枃閺堟帴锛歨ttp://njylbyy.cn/jzjswz/374.html
tag: