欢迎来到安信科技官方网站!【www.anxin66.com】
18112005550
工作时间: 8:30-21:30
新闻中心
News Center

【ASP】ASP生成静态页面最佳方法!

资讯分类: 资源共享  浏览: 2017年3月10日

 Private Sub ToHtml(FromURL,FilePath)'FilePath·?"/url/file.html"

dim objXmlHttp,binFileData,objAdoStream
Response.Write("<a href=""" & FilePath & """ target=""_blank"">" & FilePath & " --> Ok</a><br>")
FilePath = Server.MapPath(FilePath)
Set objXmlHttp=Server.createObject("Microsoft." & "XMLHTTP")
objXmlHttp.open "GET",FromURL,false
objXmlHttp.send()
binFileData=objXmlHttp.responseBody
Set objXmlHttp = Nothing
Set objAdoStream=Server.createObject("ADODB." & "Stream")
objAdoStream.Type=1
objAdoStream.Open()
objAdoStream.Write(binFileData)
objAdoStream.SaveToFile FilePath,2
objAdoStream.Close()
Set objAdoStream = Nothing
End Sub
 
在需要生成静态页面的位置,调用该过程即可。
Copyright © 2007-2022 安信科技(十五周年纪念版) All Rights Reserved  备案号:苏ICP备15047094号-3 
网站首页 |  新闻资讯 |  服务项目 |  软件产品 |  试用下载 |  需求提交 |  模版建站 |  关于安信 |  产品授权 |  联系我们 |  定制开发 | 
服务热线:181-1200-5550  客服QQ: 120094883  | 邮箱:120094883#qq.com(#改@)