我用下面的代码生成html
是按照查询数据库的ID生成,可是他每次都是从第一条记录开始,我要生成的文件比较多后面的就没发生成
谁可以告诉我怎么让后面的生成
<%@LANGUAGE="VBSCRIPT" %>
<!--#include file="Conn.asp"-->
<%Server.ScriptTimeOut=9999 %>
<%
function getHTTPPage(url) '读取URL
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",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'写出BODY的内容
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Set rs=conn.execute("Select * From SePu_biz")
do while not rs.bof and not rs.eof
Session("end_record")=rs("bizID")
Url="http://www.foodpl.cn/Biz/Bizs.asp?BizID="&rs("BizID")
Html = getHTTPPage(Url)
dim filename,MDBpath,fso,foutfilename1
filename="bizs"&rs("BizID")&".html"'这里改成你需要生成的文件名
MDBpath="/"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath("/biz/"&filename&""))
fout.Write Html
fout.close
set fout=nothing
set fso=nothing
if err then
response.Write("生成首页失败")
else
response.Write("生成首页成功")end if
rs.movenext
loop
rs.close
set rs=nothing
%>
asp生成html问题