Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the tag tag of html to achieve static

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use html's tag tag to achieve static", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use html's tag tag to achieve static" bar!

FTP downloads the tag corresponding hyperlink to the underlying file

Download / tag.lib.php (path / include/taglib/tag.lib.php) for local modification

Download arc.taglist.class.php (Luzi / include/arc.taglist.class.php) to develop local corrections

Download taglist.htm (path templets/default/taglist.htm) for non-local modification

The pseudo-static way after correction:

/ / www.css5.com.cn/tags.html

/ / www.css5.com.cn/tags/ is centered-1.html

/ / www.css5.com.cn/tags/ is centered-2.html

II. Correction / include/taglib/tag.lib.php

find

$row ['link'] = $cfg_cmsurl. "/ tags.php?/" .urlencode ($row [' keyword']). "/"

Change to

$row ['link'] = $cfg_cmsurl. "/ tags/" .rawurlencode ($row [' keyword']). "- 1.html"; 3. Open / include/arc.taglist.class.php (modify the current location navigation link site)

1. Find (lose the current link)

Function GetCurUrl () {if (! empty ($_ SERVER ["REQUEST_URI"])) {$nowurl = $_ SERVER ["REQUEST_URI"]; $nowurls = explode ("?", $nowurl); $nowurl = $nowurls [0];} else {$nowurl = $SERVER ["PHP_SELF"];} return $nowurl;}

Revised to

Function GetCurUrl () {$nowurl= $_ SERVER ["PHP_SELF"]; $nowurl=str_replace (".php",'', $nowurl); return $nowurl;}

2. Find (correct the path of the connection 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

Change to

$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. Find (correct paging link)

If ($j = = $this- > PageNo) {$listdd.= "$j\ r\ n";} else {$listdd.= "."\ r\ n ";}

Revised to

If ($j = = $this- > PageNo) {$listdd.= "$j";} else {$listdd.= ". $j.";}

4. Find (modify the path of the previous page and the next page)

If ($this- > page Notebook = 1) {$prepage.= "previous page\ r\ n"; $indexpage= "home page\ r\ n";} else {$indexpage= "home page\ r\ n";} if ($this- > page totalpage > 1) {$nextpage.= "next page\ r\ n"; $endpage= "last page\ r\ n";} else {$endpage= "last page\ r\ n";}

Correct it into

If ($this- > page Notebook = 1) {if ($this- > PageNo = = 2) {$prepage.= "previous page\ r\ n"; $indexpage= "home page\ r\ n";} else {$prepage.= "previous page"; $indexpage= "home page";}} else {$indexpage= "home page";} if ($this- > pageNottable page page; & $totalpage > 1) {$nextpage.= "next page"; $endpage= "last page";} else {$endpage= "last page";}

5. Find (modify a total of several pages and remove class and html tags)

If ($totalpage TotalResult > 0) {return "1 page /". $this- > TotalResult. "Article";} if ($this- > TotalResult = = 0) {return "0 page /". $this- > TotalResult. "Article";} $maininfo = "total {$totalpage} page /". $this- > TotalResult. "Article\ r\ n"; $purl = $this- > GetCurUrl (); $purl. = "? /" .urlencode ($this- > Tag)

Modify to

If ($totalpage TotalResult > 0) {return "1 page /". $this- > TotalResult. ";} if ($this- > TotalResult = = 0) {return" 0 page / ". $this- > TotalResult.";} $maininfo = "total {$totalpage} pages /". $this- > TotalResult. "; $purl = $this- > GetCurUrl (); $purl. = rawurlencode ($this- > Tag)

6. Be careful to correct the location error of the health factors page. The tag pseudo message contains a question mark that does not fit the error:

Beware of URL modification

$purl. = "? /" .urlencode ($this- > Tag)

Change to

$purl. = "/" .urlencode ($this- > Tag)

Open templets/default/taglist.htm (modify the current position navigation link address)

find

Current position:: home page > TAG tag > {dede:field.title /}

Revised to

Current position:: home page > TAG tag > {dede:field.title /}

Fifth, add pseudo-audio messages to define the rules:

Assuming that your space details are Windows details, please add the following delineation in the httpd.ini file:

Httpd.ini document pseudo-audio regulation

RewriteRule ^ (. *) / tags\ .html $1/tags\ .php

RewriteRule ^ (. *) / tags/ (. *)-([0-9] +). Html $1/tags\ .php\? $2Universe 3

Thank you for your reading, the above is the "how to use html's tag tag to achieve static" content, after the study of this article, I believe you on how to use html's tag tag to achieve static this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report