最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp下载远程服务器文件[rar,jpg,gif,zip,png]
时间:2022-07-02 23:08:37 编辑:袖梨 来源:一聚教程网
下载远程服务器文件[rar,jpg,gif,zip,png]
function downfilea(d_target, s_target)
On Error Resume Next
dim myhttp, objstream
set myhttp = server.createobject( "MSXML2.XMLHTTP ")
myhttp.open "GET ", d_target, false
myhttp.send()
set objstream = Server.CreateObject( "adodb.stream ")
objstream.Type = 1
objstream.Mode = 3
objstream.Open
objstream.Write myhttp.responseBody
objstream.SaveToFile s_target, 2
if err.number 0 then err.Clear
end function
downfilea "https://www.1**1*1cn.net/xxx.rar ", Server.MapPath( "down/xxx.rar ")
Response.write "ok "
%>
还有asp版本的(未测试)
using System;
using System.Net;
using System.IO;
class DownloadFile;
{
static void Main(string[] args)
{
//你的远程文件
string siteURL="http://www.**a*bc.com/xxx.rar";
//下载到本地的路径及文件名
string fileName="c:xxx.rar";
//实例化一个WebClient
WebClient client=new WebClient();
//调用WebClient的DownloadFile方法
client.DownloadFile(siteURL,fileName);
}
}
相关文章
- 环外职业如何选择 09-17
- 口袋斗罗大陆唐三怎么培养 09-17
- 妖怪金手指盘古阵容如何搭配 09-17
- 鸣潮尤诺培养材料有哪些-尤诺突破养成材料汇总 09-17
- 王者荣耀星火赤壁模式怎么玩 09-17
- 逆战未来机甲排位模式怎么玩 09-17