《CMS系統:PHPCMS v9手機偽靜態方法》要點:
本文介紹了CMS系統:PHPCMS v9手機偽靜態方法,希望對您有用。如果有疑問,可以聯系我們。
相關主題:PHPCMS教程
- function?list_url($typeid)?{?
- ????#return?WAP_SITEURL."&a=lists&typeid=$typeid";?
- ????return?"/list-$typeid".'.html';?
- }?
- ?
- ?
- ?
- function?show_url($catid,?$id,?$typeid='')?{?
- global?$WAP;?
- if($typeid=='')?{?
- ??$types?=?getcache('wap_type','wap');?
- ??foreach?($types?as?$type)?{?
- ???if($type['cat']==$catid)?{?
- ????$typeid?=?$type['typeid'];?
- ????break;?
- ???}?
- ??}?
- }???
- ????#return?WAP_SITEURL."&a=show&catid=$catid&typeid=$typeid&id=$id";?
- ????return?"/show-$catid-$typeid-$id-1".'.html';?
- }?
CMS系統2、打開/phpcms/modules/wap/index.php
找到第59行,如下圖所示的注釋掉的那行代碼,在下面加入一行代碼.
- #define('URLRULE',?'index.php?m=wap&c=index&a=lists&typeid={$typeid}~index.php?m=wap&c=index&a=lists&typeid={$typeid}&page={$page}');?
- ?
- define('URLRULE',?'list-{$typeid}.html~list-{$typeid}-{$page}.html');?
CMS系統3、添加偽靜態規則,打開根目錄的權限文件,添加如下代碼
?
- RewriteRule?^list-([0-9]+)-([0-9]+)?index.php?&a=lists&typeid=$1&page=$2?
- RewriteRule?^list-([0-9]+)?index.php?&a=lists&typeid=$1;?
- RewriteRule?^show-([0-9]+)-([0-9]+)-([0-9]+)?index.php?a=show&catid=$1&typeid=$2&id=$3;?
CMS系統?
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/5609.html