2楼正确 附上 我用的代码 <?='<?xml version="1.0" encoding="UTF-8"?>'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>[!--news.url--]</loc> <priority>1.000</priority> <changefreq>always</changefreq> </url> [e:loop={"select * from [!db.pre!]enewsclass order by myorder",0,24,0}] <? if($bqr['classurl']=='') { $sccurl=$public_r['newsurl'].$bqr['classpath']."/"; } else { $sccurl=$bqr['classurl']."/"; } ?> <url> <loc><?=$sccurl?></loc> <priority>0.7000</priority> <changefreq>hourly</changefreq> </url> [/e:loop] [e:loop={"select * from [!db.pre!]enewszt order by ztid",0,24,0}] <? if($bqr['zturl']=='') { $sccurl=$public_r['newsurl'].$bqr['ztpath']."/"; } else { $sccurl=$bqr['zturl']."/"; } ?> <url> <loc><?=$sccurl?></loc> <priority>0.6000</priority> <changefreq>hourly</changefreq> </url> [/e:loop] [e:loop={"select * from [!db.pre!]ecms_news where checked=1 order by newstime",0,24,0}] <url> <loc><?=$bqsr[titleurl]?></loc> <priority>0.50</priority> <lastmod><?=format_datetime($bqr[lastdotime],'Y-m-d')?></lastmod> <changefreq>daily</changefreq> </url> [/e:loop] [e:loop={"select * from [!db.pre!]ecms_download where checked=1 order by newstime",0,24,0}] <url> <loc><?=$bqsr[titleurl]?></loc> <priority>0.50</priority> <lastmod><?=format_datetime($bqr[lastdotime],'Y-m-d')?></lastmod> <changefreq>daily</changefreq> </url> [/e:loop] </urlset>
|