asp生成静态HTML(动态读取)(2)
BodyText=replace(BodyText,"index.asp","index.htm")
BodyText=replace(BodyText,"about.asp","about.htm")
BodyText=replace(BodyText,"pro.asp","pro.htm")
BodyText=replace(BodyText,"news.asp","news.htm")
BodyText=replace(BodyText,"liuyan.asp","liuyan.htm")
BodyText=replace(BodyText,"ry.asp","ry.htm")
BodyText=replace(BodyText,"xinwen.asp","xinwen.htm")
BodyText=replace(BodyText,"contact.asp","contact.htm")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile= fso.CreateTextFile(server.MapPath(turl), True)
MyFile.WriteLine(BodyText)
MyFile.Close
response.Write mess
response.Write "<br>"
End Function
Public Function RegReplace(sContent, sPatrn, sNewStr)
Dim oTempReg : Set oTempReg = New RegExp
With oTempReg
.IgnoreCase = True
.Global = True
.Pattern = sPatrn
RegReplace = .Replace(sContent, sNewStr)
End With
Set oTempReg = Nothing
End Function
call CloseDatabase()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<style>
body,td{font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10.5pt;}
</style>
</head>
<body>
</body>
</html>
来自 iisboy