涓湅(gu贸)鏈€鍏风(j矛ng)鐖�(zh膿ng)鍔涚殑缍�(w菐ng)绲�(lu貌)鐕�(y铆ng)閵峰挩瑭€€佸煿瑷�(x霉n)鍙婃妧琛�(sh霉)鏈嶅嫏(w霉)姗�(j墨)妲�(g貌u)

杩斿洖棣栭爜(y猫) / 鎵嬫(j墨)缍�(w菐ng)绔� / 鑱�(li谩n)绯绘垜鍊�


鍟嗕笜鍋氱恫(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"?>
03 <url>
04 <loc>/</loc>
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>
10 </url>
11 {dede:channel row='10' type='top'}
12 <url>
13 <loc>[field:typelink /]</loc>
14 <changefreq>daily</changefreq>
15 <priority>0.8</priority>
16 </url>
17 {/dede:channel}
18 {dede:arclist row=1000 orderby=pubdate}
19 <url>
20 <loc>[field:arcurl/]</loc>
21 <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
22 <changefreq>monthly</changefreq>
23 </url>
24 {/dede:arclist}
25 </urlset>
 

 

绗簩姝ャ€佹墜鍕�(d貌ng)瀵竴鍊�(g猫)瑷�(j矛)鍔冧换鍕�(w霉)鍩�(zh铆)琛屾枃浠讹紝灏囪┎鏂囦欢鍛藉悕鐐篻enerate_sitemap.php锛屾斁鍦�/plus/task鐩寗閲�锛屾枃浠剁殑鍏�(n猫i)瀹瑰涓嬶細

 

01 <?php
02 //瀹氭檪(sh铆)鐢熸垚缍�(w菐ng)绔欏湴鍦�
03 require_once(dirname(__FILE__).'/../../include/common.inc.php');
04 include(DEDEINC."/arc.listview.class.php");
05 $lv = new ListView();
06  
07 //瑙f瀽妯℃澘鍒板瓧绗︿覆
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);
13  
14 ?>

 

绗笁姝�銆佸湪绻斿あ(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:
涓婁竴绡囷細 鍟嗕笜缍�(w菐ng)绲�(lu貌)鍏徃鎬庢ǎ璁揹edecms鐢熸垚sitemap.xml 涓嬩竴绡囷細 鍟嗕笜缍�(w菐ng)绲�(lu貌)鍏徃鑷仼鎳�(y墨ng)绔欓€欐ǎ鍋氳€佺珯涓嶇敤鑺遍將鑷繁瑭�
鐩搁棞(gu膩n)鏂囩珷