生成静态页面

<%
Dim URL,Update,startimer,endtimer,overdate
url="../index_html.asp"
Update=GetURL(URL)
overdate=bytes2bstr2(Update)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("index.html"))
fout.WriteLine overdate
fout.close

Const adTypeText = 2
Function GetURL(URL)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False
.Send
GetURL = .responsebody
End With
Set Retrieval = Nothing
End Function
Function Bytes2bStr2(vin)
Dim BytesStream,StringReturn

Set BytesStream = Server.CreateObject("ADODB.Stream")
With BytesStream
.Type = adTypeText
.Open
.WriteText vin

.Position = 0

.Charset = "GB2312"
.Position = 2
StringReturn = .ReadText
.close
End With
Set BytesStream = Nothing
Bytes2bStr2 = StringReturn
End Function
response.write"<script>alert('更新成功!');history.back();</Script>"
%>

你可能感兴趣的:(html,Microsoft,asp)