注意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
%>
asp文件打包
【PJblog3 博客系统生成静态首页的简单方法】相关文章:
★ 齐博CMS文章关键字加亮时图片alt文字被替换的解决方法
★ 简单的改变 joomla 后台administrator目录的方法