最新下载
热门教程
- 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);
}
}
相关文章
- 怪物猎人荒野操虫棍百暴配装搭配分享 10-01
- 所有情人节的日子(关于所有的情人节短句情话) 10-01
- 怪物猎人荒野大剑终盘配装搭配分享 10-01
- 怪物猎人荒野轮椅贯通重弩配装搭配分享 10-01
- 怪物猎人荒野百会物理毒棍配装搭配分享 10-01
- 怪物猎人荒野满会无狂龙斩斧配装搭配分享 10-01