最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 复制文件与保存远程服务器文件
时间:2022-06-30 11:41:53 编辑:袖梨 来源:一聚教程网
'==============================
'函 数 名:CopyFiles
'作 用:复制文件
'参 数:文件来源地址SourcePath,文件复制到地址CopyToPath
'==============================
Function CopyFiles(SourcePath,CopyToPath)
Set Fso=Server.CreateObject("Scri"&"pting.File"&"Sys"&"temObject")
Fso.CopyFile Server.MapPath(SourcePath),Server.MapPath(CopyToPath)
Set Fso=nothing
End Function
'==============================
'函 数 名:SaveRemoteFile
'作 用:保存远程图片
'参 数:图片来源网址SourceUrl,图片保存地址SavePath
'==============================
Sub SaveRemoteFile(SourceUrl,SavePath)
On Error Resume Next
Set Temp = Server.CreateObject("Mic"&"roso"&"ft.XML"&"HT"&"TP")
With Temp
.Open "Get", SourceUrl, False, "", ""
.Send
If Err.number<>0 Then
Exit Sub
End If
F = .ResponseBody
End With
Set Temp = Nothing
Set objAdoStream = Server.CreateObject("A"&"dod"&"b.St"&"r"&"eam")
With objAdoStream
.Type = 1
.Open
.Write F
.SaveToFile Server.MapPath(SavePath), 2
.Cancel()
.Close()
End With
Set objAdoStream=nothing
End Sub
End Class
相关文章
- 梦幻西游铸魂任务怎么做-铸魂任务攻略 07-12
- 剑星全钓鱼点与限定稀有鱼在哪里 钓鱼点及稀有鱼位置分享 07-12
- 怀念父亲的心情说说 07-12
- 原神伊涅芙用什么武器 伊涅芙武器适配推荐 07-12
- Polymarket预测7月比特币达12万美元概率为80% 07-12
- 无畏契约源能行动捷风实战 玩法技巧分享 07-12