首页生成htm
作者:cmscn 日期:2009-02-26
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Refresh"content="2;URL=index.htm"/>
<title>更新网页</title>
</head>
<body>
<%
dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url,Html_Temp
Html_Temp="<UL>"
Html_Temp = Html_Temp&"<LI>"
FileName = "index.htm"
FilePath = Server.MapPath("/")&"\"&FileName
Html_Temp = Html_Temp&FilePath&"</LI>"
Do_Url = "http://"
Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/main.asp"
strUrl = Do_Url
dim objXmlHttp
set objXmlHttp = Server.createObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
Dim binFileData
binFileData = objXmlHttp.responseBody
Dim objAdoStream
set objAdoStream = Server.createObject("ADODB.Stream")
objAdoStream.Type = 1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
Html_Temp = Html_Temp&"<UL>"
%>
<%
Response.Write ( "成功生成文件: index.htm<br>更新页面成功,2秒后自动返回" )
Response.Write("")
'Response.Write ( "<BR>" )
'Response.Write Html_Temp
%>
</body>
</html>
<IFRAME WIDTH=0 HEIGHT=0></IFRAME>
评论: 0 | 引用: 0 | 查看次数: 459
发表评论