這篇文章主要講解了“怎么用html的tag標(biāo)簽實(shí)現(xiàn)靜態(tài)化”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“怎么用html的tag標(biāo)簽實(shí)現(xiàn)靜態(tài)化”吧!
目前創(chuàng)新互聯(lián)建站已為千余家的企業(yè)提供了網(wǎng)站建設(shè)、域名、雅安服務(wù)器托管、網(wǎng)站托管、服務(wù)器托管、企業(yè)網(wǎng)站設(shè)計(jì)、越城網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。
下載/tag.lib.php(途徑/include/taglib/tag.lib.php)進(jìn)行本地修改
下載arc.taglist.class.php(路子/include/arc.taglist.class.php)發(fā)展當(dāng)?shù)匦拚?br/>
下載taglist.htm(路徑templets/default/taglist.htm)進(jìn)行外地修改
批改后偽靜態(tài)后路子:
//www.css5.com.cn/tags.html
//www.css5.com.cn/tags/居中-1.html
//www.css5.com.cn/tags/居中-2.html
找到
$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
改成
$row['link'] = $cfg_cmsurl."/tags/".rawurlencode($row['keyword'])."-1.html";
1、找到(失去當(dāng)前鏈接所在)
function GetCurUrl() { if(!empty($_SERVER["REQUEST_URI"])) { $nowurl = $_SERVER["REQUEST_URI"]; $nowurls = explode("?",$nowurl); $nowurl = $nowurls[0]; } else { $nowurl = $_SERVER["PHP_SELF"]; } return $nowurl; }
修正成
function GetCurUrl() { $nowurl = $_SERVER["PHP_SELF"]; $nowurl=str_replace(".php",'',$nowurl); return $nowurl; }
2、找到(批改連接所在路徑1)
$plist = ''; if(preg_match('/info/i', $listitem)) { $plist .= $maininfo.' '; } if(preg_match('/index/i', $listitem)) { $plist .= $indexpage.' '; } if(preg_match('/pre/i', $listitem)) { $plist .= $prepage.' '; } if(preg_match('/pageno/i', $listitem)) { $plist .= $listdd.' '; } if(preg_match('/next/i', $listitem)) { $plist .= $nextpage.' '; } if(preg_match('/end/i', $listitem)) { $plist .= $endpage.' '; } return $plist;
改成
$plist = ''; if(eregi('info',$listitem)) { $plist .= $maininfo.' '; } if(eregi('index',$listitem)) { $plist .= $indexpage.' '; } if(eregi('pre',$listitem)) { $plist .= $prepage.' '; } if(eregi('pageno',$listitem)) { $plist .= $listdd.' '; } if(eregi('next',$listitem)) { $plist .= $nextpage.' '; } if(eregi('end',$listitem)) { $plist .= $endpage.' '; } return $plist;
3、找到(批改分頁鏈接)
if($j == $this->PageNo) { $listdd.= "<li class=\"thisclass\"><a>$j</a></li>\r\n"; } else { $listdd.="<li><a href='".$purl."/$j/'>".$j."</a></li>\r\n"; }
修正成
if($j == $this->PageNo) { $listdd.= " $j "; } else { $listdd.=" <a href='".$purl."-$j.html'>".$j."</a> "; }
4、找到(修改分頁 上一頁 下一頁門路)
if($this->PageNo != 1) { $prepage.="<li><a href='".$purl."/$prepagenum/'>上一頁</a></li>\r\n"; $indexpage="<li><a href='".$purl."/1/'>首頁</a></li>\r\n"; } else { $indexpage="<li><a>首頁</a></li>\r\n"; } if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.="<li><a href='".$purl."/$nextpagenum/'>下一頁</a></li>\r\n"; $endpage="<li><a href='".$purl."/$totalpage/'>末頁</a></li>\r\n"; } else { $endpage="<li><a>末頁</a></li>\r\n"; }
批改成
if($this->PageNo != 1) { if($this->PageNo == 2){ $prepage.="<a href='".$purl."-1.html'>上一頁</a>\r\n"; $indexpage="<a href='".$purl."-1.html'>首頁</a>\r\n"; } else{ $prepage.=" <a href='".$purl."-$prepagenum.html'>上一頁</a> "; $indexpage=" <a href='".$purl."-1.html'>首頁</a> "; } } else { $indexpage=" 首頁 "; } if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.=" <a href='".$purl."-$nextpagenum.html'>下一頁</a> "; $endpage=" <a href='".$purl."-$totalpage.html'>末頁</a> "; } else { $endpage="末頁"; }
5、找到(修改 共幾頁 去掉class與html標(biāo)簽)
if($totalpage <= 1 && $this->TotalResult > 0) { return "<span class=\"pageinfo\">共1頁/".$this->TotalResult."條</span>"; } if($this->TotalResult == 0) { return "<span class=\"pageinfo\">共0頁/".$this->TotalResult."條</span>"; } $maininfo = "<span class=\"pageinfo\">共{$totalpage}頁/".$this->TotalResult."條</span>\r\n"; $purl = $this->GetCurUrl(); $purl .= "?/".urlencode($this->Tag);
修改成
if($totalpage <= 1 && $this->TotalResult > 0) { return "共1頁/".$this->TotalResult.""; } if($this->TotalResult == 0) { return "共0頁/".$this->TotalResult.""; } $maininfo = "共{$totalpage}頁/".$this->TotalResult.""; $purl = $this->GetCurUrl(); $purl .= rawurlencode($this->Tag);
6、當(dāng)心修改生因素頁地點(diǎn)過失修正,tag偽消息所在自帶問號(hào)不合錯(cuò)誤:
當(dāng)心URL修改
$purl .= "?/".urlencode($this->Tag);
改成
$purl .= "/".urlencode($this->Tag);
找到
<strong>目前職位:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主頁</a> > <a href='tags.php'>TAG標(biāo)簽</a> > {dede:field.title /}
修正成
<strong>當(dāng)前職位:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主頁</a> > <a href='/tags.html'>TAG標(biāo)簽</a> > {dede:field.title /}
假定你的空間瑣屑是Windows細(xì)碎請(qǐng)?jiān)趆ttpd.ini 文件里進(jìn)行增加下列劃定:
httpd.ini 文件偽音訊規(guī)定
RewriteRule ^(.*)/tags\.html $1/tags\.php
RewriteRule ^(.*)/tags/(.*)-([0-9]+).html $1/tags\.php\?$2/$3
感謝各位的閱讀,以上就是“怎么用html的tag標(biāo)簽實(shí)現(xiàn)靜態(tài)化”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)怎么用html的tag標(biāo)簽實(shí)現(xiàn)靜態(tài)化這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!
網(wǎng)站標(biāo)題:怎么用html的tag標(biāo)簽實(shí)現(xiàn)靜態(tài)化
本文URL:http://sd-ha.com/article0/jgedoo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動(dòng)態(tài)網(wǎng)站、品牌網(wǎng)站制作、網(wǎng)頁設(shè)計(jì)公司、虛擬主機(jī)、ChatGPT、App設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)