|
用的良精的生成html版的企业网站系统做了一个单机游戏下载站、
问题是:他这个是一口气生成所有新闻页静态页面,如果内容达到1000条以上,会卡死,iis超时
我想改成一批生成10个,3秒后生成下一批
主要代码如下:
<%
totalrec=Conn.Execute("select count(*) from niu_News")(0)
sql="Select * from niu_News order by ID desc"
Set Rs=Conn.Execute(sql)
if totalrec=0 then
Detail_Num=0
Else
Detail_Num=1
do while not rs.eof
ID=rs("ID")
sortid=rs("sortid")
call htmll("","","game/"&ID&"."&HTMLName&"","newsview.asp","ID=",ID,"sortid=",sortid&"&menuclass=xinwen")
Response.Write "<script>bar_img.width="&Fix((Detail_Num/totalrec)*300)&";"
Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页,完成比例:" & formatnumber(Detail_Num/totalrec*100) & """;</script>"
Response.Flush
rs.movenext
Detail_Num=Detail_Num+1
loop
end if
rs.close
set rs=Nothing
conn.close
set conn=Nothing
%> |
|