asp 生成静态
<%
Do_Url = "http://"
'Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/shownews.asp" 主目录
aa=Request.Servervariables("url") '虚拟目录
bb=InstrRev(aa,"/")
cc=left(aa,bb)
Do_Url = Do_Url&Request.ServerVariables("HTTP_HOST")&cc&"index.asp"
call SaveFile("index.htm",Do_Url)
function SaveFile(LocalFileName,RemoteFileUrl)
Dim Ads, Retrieval, GetRemoteData
On Error Resume Next
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile Server.MapPath(LocalFileName), 2
.Cancel()
.Close()
End With
Set Ads=nothing
if err <> 0 then
SaveFile = false
err.clear
else
SaveFile = true
end if
End function
%>