在et下设计下,sitemap变得非常简单,模板中这样的


<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{config['url']}</loc>
<lastmod>{nowtime}</lastmod>
<changefreq>always</changefreq>
<priority>1.0</priority>
</url>
<!--$list as $lst-->
<url>
<loc>{config['url']}{lst['act']}{lst['linkname']}{lst['id']}{lst['page']}.htm</loc>
<lastmod>{lst[datetime]}</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<!--end-->
</urlset>


结果发现数组相加的时候,会因相同的key而消失!事得其反,在下班的时候,发现了正常了
新的sitemap点这里厦门机票
Tags:

    #products
        RewriteRule ^products/([0-9]+)\.htm$ products.php\?&page=$1
        RewriteRule ^products/([0-9]+)-([0-9]+)\.htm$ products.php\?id=$1\&page=$2
        RewriteRule ^products/([a-zA-Z+|\_|\-]+)([0-9]+)-([0-9]+)\.htm$ products.php\?linkname=$1\&id=$2\&page=$3
        RewriteRule ^products/([a-zA-Z+|\_|\-]+)-([0-9]+)\.htm$ products.php\?linkname=$1\&page=$2
        RewriteRule ^product/([a-zA-Z|\-|\_]+|)([0-9]+)\.htm$ product.php?id=$2


数字,或是字母,或是混合!
Tags:
$str= "3,4,5";
echo preg_replace("[(\d+)|(,)]", "-", $str);


虽然是少了点,但也是到学到内容!

ps
標題錯了!
Pages: 1/1 First page 1 Final page [ View by Articles | List ]