以后地位:首页 > 建站常识 > 列表

ASP 批量分批天生静态文件

点击: 次时候:2016/10/18关头词:ASP 批量天生 静态文件
ASP批量天生静态HTML的实例法式,能够批量天生,也能够批量删除,页面不怎样丑化,关头是想完成ASP天生静态的功效。天生HTML速率很快Dim StarTimeDim cnt:cnt = 1StarTime = Timer()start = reques

ASP批量天生静态HTML的实例法式,能够批量天生,也能够批量删除,页面不怎样丑化,关头是想完成ASP天生静态的功效。天生HTML速率很快

Dim StarTime
Dim cnt:cnt = 1
StarTime = Timer()

start = request("start") '获得本轮指针的起头地位
If IsNumeric(start) Then start = CLng(start) Else start=1
If start=0 Then start = 1

set rs4=server.createobject("adodb.recordset")
sql="select * from gjc"
rs4.open sql,conn,1,1
rs4.AbsolutePosition = start
while not rs4.eof and cnt < 21
k=rs4("tags")
py=rs4("pinyin")
title=rs4("title")

Call CheckAndCreateFolder("/ganxi/"&py)
FileName="/ganxi/"&py&"/index.html" '要天生的文件途径及地点
UrlPath ="http://3djiangyin.com/2.asp?key="&k&"&t="&title&"&"
Call SaveToFile(FileName,GetTheHTMLCode(UrlPath))

cnt = cnt + 1
start = start + 1
rs4.movenext
wend
if not rs4.eof Then '经由过程革新的体例停止下一轮要求,并将指针变量start通报到下一轮
response.write "<meta http-equiv='refresh' content='0;URL=?start="&start&"'>"
else

Dim EndTime
EndTime = Timer()
sj=FormatNumber((EndTime - StarTime) * 1000, 3)
sj=sj/1000

response.write "<script language='javascript'>" & chr(13)
response.write "alert('批量天天生功,所需时候:"&sj&" 秒');" & Chr(13)
response.write "window.document.location.href='index.asp?page="&pg&"';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
end if

预定建站
收费供给网站优化
支付关头词