首页生成htm


<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>



文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 生成
相关日志:
评论: 0 | 引用: 0 | 查看次数: 459
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭