ASP 網站靜態化代碼
Html,具體的功能大家可以測試下。
Function htmll(mulu,htmlmulu,FileName,filefrom,htmla,htmlb,htmlc,Htmld)
if mulu="" then mulu="/"
if htmlmulu="" then Htmlmulu="/"
mulu=replace(SysRootDir&mulu, "//", "/")
htmlmulu=replace(SysRootDir&Htmlmulu, "//", "/")
FilePath=Server.MapPath(mulu)&"\"&FileName
Do_Url="http://"
Do_Url=Do_Url&Request.ServerVariables("server_name")&Htmlmulu&filefrom
Do_Url=Do_Url&"?"&htmla&htmlb&"&"&htmlc&Htmld
strUrl=Do_Url
set objXmlHttp=Server.createObject("Microsoft.XMLHTTP")
objXMLHttp.open "GET",strUrl,false
objXMLHttp.send()
binFileData=objXMLHttp.responseBody
Set objXMLHttp=Nothing
set objADOStream=Server.CreateObject("Adodb." & "Stream")
objADOStream.Type=1
objADOStream.Open()
objADOStream.Write(binFileData)
objADOStream.SaveToFile FilePath,2
objADOStream.Close()
set objADOStream=nothing
End Function