精品久久看,欧美成人久久一级c片免费,日本加勒比在线精品视频,国产一区二区三区免费大片天美,国产成人精品999在线,97理论三级九七午夜在线观看

當(dāng)前位置: 首頁(yè)IT技術(shù) → Asp生成html實(shí)例代碼的分享

Asp生成html實(shí)例代碼的分享

更多

這是一個(gè)ASP生成html的代碼,現(xiàn)在拿出來(lái)跟大家一起分享,希望對(duì)正在學(xué)習(xí)ASP的朋友們能夠有所幫助。

<%
Function GetPage(url)
'獲得文件內(nèi)容
dim Retrieval
Set Retrieval = CreateObject("microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False ', "", ""
.Send
GetPage = BytesToBstr(.ResponseBody)
End With
Set Retrieval = Nothing
End Function

Function BytesToBstr(body)
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 = "GB2312"
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'++++++++++++++++++++++++++++++++++++++++++++++++生成HTML文件開(kāi)始
on error resume next
Url="http://www.pc-5.cn/txt/index-txt.asp"'要讀取的頁(yè)面地址
wstr = GetPage(Url)

'response.write(wstr)
Set fs=Server.CreateObject("Scripting.FileSystemObject")

'if not MyFile.FolderExists(server.MapPath("/html/")) then
'MyFile.CreateFolder(server.MapPath("/html/"))'
'end if

'要存放的頁(yè)面地址
dizhi=server.MapPath("index.html")
If (fs.FileExists(dizhi)) Then
fs.DeleteFile(dizhi)
End If
Set CrFi=fs.CreateTextFile(dizhi)
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
'++++++++++++++++++++++++++++++++++++++++++++++++生成HTML文件結(jié)束

'循環(huán)生成文章開(kāi)始
for i=1 to 3026 step 1

'++++++++++++++++++++++++++++++++++++++++++++++++生成HTML文件開(kāi)始
on error resume next
Url=http://www.pc-5.cn/txt/list.asp?id=100'要讀取的頁(yè)面地址
wstr = GetPage(Url)

'response.write(wstr)
Set fs=Server.CreateObject("Scripting.FileSystemObject")

'if not MyFile.FolderExists(server.MapPath("/html/")) then
'MyFile.CreateFolder(server.MapPath("/html/"))'
'end if

'要存放的頁(yè)面地址
dizhi=server.MapPath("100.html")
If (fs.FileExists(dizhi)) Then
fs.DeleteFile(dizhi)
End If
Set CrFi=fs.CreateTextFile(dizhi)
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
'++++++++++++++++++++++++++++++++++++++++++++++++生成HTML文件結(jié)束

next

'循環(huán)生成文章結(jié)束
response.write("已經(jīng)生成所有首頁(yè)調(diào)用的標(biāo)題,請(qǐng)返回!")
Response.redirect(request.servervariables("http_referer"))
%>

熱門(mén)評(píng)論
最新評(píng)論
發(fā)表評(píng)論 查看所有評(píng)論(0)
昵稱(chēng):
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過(guò)審核才能顯示)
主站蜘蛛池模板: 欧美中文字幕在线播放 | 国产成人一级片 | 九九涩| 色播五月综合 | 欧美一级网 | 一级毛片免费的 | 梦华录百度网盘下载 | 久久亚洲aⅴ精品网站婷婷 久久鸭综合久久国产 | 国产成人精品久久一区二区三区 | 99伊人 | 欧美激情片网站 | 奇米电影高清完整视频 | 国产精品久久久久影院嫩草 | 都市激情综合网 | 青草青草视频2免费观看 | 99久久一区 | 男女视频网站在线观看 | 77777亚洲午夜久久多人 | 看中国一级毛片 | 久久精品观看 | 第十影院网 | 免费看片亚洲 | 国产小视频在线高清播放 | 91最新网站 | 国产黄色小视频在线观看 | 天天综合久久久网 | 免费精品一区二区三区第35 | 久久只有精品视频 | 国产小视频免费在线观看 | 成人视品 | 久中文字幕中文字幕亚洲无线 | 国产日韩在线观看视频 | 国产成人a | 222www免费视频 | 国产91色综合久久免费分享 | 精品国产福利久久久 | 欧美国产成人精品一区二区三区 | 亚洲国产系列久久精品99人人 | 国产在线播放你懂的 | 99视频九九精品视频在线观看 | 色人阁五月 |