復制代碼 代碼如下:
%
if SaveFile("/htm/list.htm","http://www.xxx.com/asp/list.asp") then
Response.write "已生成"
else
Response.write "沒有生成"
end if
function SaveFile(LocalFileName,RemoteFileUrl)
Dim Ads, Retrieval, GetRemoteData
On Error Resume Next
Set Retrieval = Server.CreateObject("Microso" "ft.XM" "LHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Ado" "db.Str" "eam")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile Server.MapPath(LocalFileName), 2
.Cancel()
.Close()
End With
Set Ads=nothing
if err > 0 then
SaveFile = false
err.clear
else
SaveFile = true
end if
End function
%>
您可能感興趣的文章:- ASP生成html的新方法
- asp分頁生成html的程序腳本代碼
- 在ASP中使用FSO組件生成HTML頁面
- Asp生成HTML方法大全
- ASP新聞分頁,將一篇過長的文章分頁,生成靜態(tài)頁面
- fso asp生成靜態(tài)html的代碼
- ASP生成靜態(tài)文件編碼為UTF-8格式的HTML文件
- ASP生成靜態(tài)htm頁面基本代碼
- ASP網站生成靜態(tài)html頁面技術小結
- ASP中不用模板生成HTML靜態(tài)頁面的方法