ASP生成静态首页的示例代码
简单点的,ASP生成静态首页的示例代码
<%
dim objXmlHttp,binFileData,objAdoStream
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET","http://"&request.ServerVariables("HTTP_HOST")&"/index1.asp",false
objXmlHttp.send()
binFileData = objXmlHttp.responseBody
set objAdoStream = Server.CreateObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile server.MapPath("../index.html"),2
objAdoStream.Close()
set objAdoStream=nothing
set objXmlHttp=nothing
response.write"<script language=javascript>alert('首页生成完成!');this.location.href='manage_main.asp';</script>"
%>