生成静态页面总是不成功,大家帮我看一下啊
lujing是从前一个页面取得的,我这里给一个常量,大家看着明白就行了
lujing="henan,shandong,beijing,shenzhen,shanghai,guangzhou,suzhou,lanzhou,guizhou"
lujingv=split(lujing,",")
for i=0 to ubound(lujingv)
if trim(lujingv(i))<>"" then
filename="../"& trim(lujingv(i)) &"/index.html"
response.Write(filename&"<br>")
txtURL="http://www.xxxxxxx.cn/"& trim(lujingv(i)) &"/index.asp"
sText = getHTTPPage(txtURL)
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set openFile=FileObject.OpenTextfile(server.MapPath(filename),2,true) 'true为不存在自行建立
openFile.writeline(sText)
Set OpenFile=nothing
set FileObject=nothing
end if
next
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "POST",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
每次提交生成静态的时候,运行了一半就停止不动了,真是郁闷
大家帮我看看怎么回事儿?