谁有ASP生成静态页面的例子啊,给我看看啊
谁有ASP生成静态页面的例子啊,给我看看啊 大家可以交流交流啊
------解决方案--------------------function SaveFile(LocalFileName,RemoteFileUrl)
Dim Ads, Retrieval, GetRemoteData
'On Error Resume Next
'Set Retrieval = Server.CreateObject( "Microsoft.XMLHTTP ")
Set Retrieval = Server.CreateObject( "MSXML2.serverXMLHTTP ")
'以上修改过
With Retrieval
.Open "Get ", RemoteFileUrl, False, " ", " "
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject( "Adodb.Stream ")
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
if SaveFile( "../news/TGPArtView_ "&id& ".html ", "http://localhost/TGPArtView.asp?artID= "&id& " ") then
response.Write "成功 "
end if