注意IIS里的文档要调为index.htm优先才可以,在官方的正式静态没出来前这是个不错的临时解决办法,比之前的直接访问动态页面要爽多了,不用再死等服务器的处理了!
复制代码 代码如下:
<%
dim strUrl,Item_Classid,id,FileName,FilePath,Do_Url,Html_Temp
Html_Temp=”<UL>”
For i=1 To 1
Html_Temp = Html_Temp&”<LI>”
Item_Classid = i
FileName = “index.htm”
FilePath = Server.MapPath(“/”)&”\”&FileName
Html_Temp = Html_Temp&FilePath&”</LI>”
Do_Url = “http://”
Do_Url = Do_Url&Request.ServerVariables(“SERVER_NAME”)&”/default.asp”
‘Do_Url = Do_Url&”?Item_Classid=”&Item_Classid
strUrl = Do_Url
call makehtml (strUrl,FilePath)
Next
Html_Temp = Html_Temp&”<UL>”
Response.Write ( “首页发布完成!” )
Response.Write ( ”
” )
Response.Write Html_Temp
function makehtml(strUrl,FilePath)
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()
end function
%>
Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard. Commenter avatars come from Gravatar.