inicio mail me! sindicaci;ón

The method that replaces with label generates static webpage

It is easier that everybody knows webpage of HTML static state the index that be collected by search engine, trends generates HTML webpage, also can make the webpage measure increase of the website, the measure that search engine collects is possible also much, add next quality that improve a webpage again also meaning did not wear what? I think everybody also knows.

For this, I decided the website is built before the change, the method that the webpage devises, the research that the course turns over more and think, to the method that a variety of webpage trends create, I prefer the method that replaces with label to become unripe webpage.

Label replaces a method: This is the definition that my individual understands, do not know how people cries it, ah!

Label replaces a method, in designing good webpage pattern plate namely, put from already the label of set, need those who come to show with you next east east replace it. Be like

Pattern plate file 1

We save this pattern plate to be expressed in the database in Temptable

<html>
<head>
<title>{$SiteName} </title>
</head>
<body>
{$Arc_List$}
</body>
<html>

In above pattern plate I put list of name of website of two label {$SiteName} and {$Arc_List$} article, will read the code below again

<%Dim Rs, siteName, arc_List, fso, myFile, filePath, html
The HTML webpage that the first my trends generates SiteName= ” “
FilePath = Server.MapPath(”/html/index.html” )Set Rs=server.createobject(”adodb.recordset” )Rs.open “select [Temp] From Temptable, conn, 1, 1Html = Rs(”temp” ) ‘ is read take webpage pattern plateRs.close
Html = Replace(html, “{$SiteName}” , siteName) ‘ is used from the definition SiteName replaces {$SiteName} labelHtml = Html&Replace(html, “{$Arc_List$} ” , get_ArcList() ) ‘ replaces {$Arc_List$} label with the Get_ArcList() function that defines oneselfSet Rs=nothingConn.closeSet Conn=nothing
Set Fso=CreateObject(”***ing.FileSystemObject” ) ‘ establishs file system target
Set MyFile = Fso.CreateTextFile(FilePath, true) ‘ founds a file
MyFile.WriteLine(html) ‘ writes Htm code into the file
MyFile.close ‘ shuts a file
Set MyFile = Nothing ‘ releases file objectSet Fso = Nothing ‘ releases systematic file objectFile of Response.write "<*** Language=’java***’>window.alert(’ makes a success ‘);</***> "Response.end()

Function Get_ArcList()Dim Str, str1Str1= ” “Str = "<ul>{list}</ul> "Rs.open “select Title, url From Arc “While Not Rs.eofStr1 = Str1&"<li><a Href=" &rs("url" )&"> " &rs("Title" )&"</a></li> "Rs.movenextWendRs.closeStr = Replace(str, “{list}” , str1)Get_ArcList = Str

%>

End Function

The method of above is very simple, very much now CMS uses this kind of method to generate static webpage, this kind of method is used more agile, want you to design your system attentively only, the net does a website after, it is OK to should design pattern plate only. . . Ah, a website builds Yu now the company goes to work, at one’s leisure can be written at will a bit east, the QQ of Yu: 645556964, the welcome does a friend to discuss communication jointly, ah

Bookmark:Digg Del.icio.us Reddit

Leave a Comment