資源簡介
c#實現ftp上傳下載(源碼)。這個可以簡單達到目的。-c# to achieve ftp upload and download. This can be simple to achieve their goals.
代碼片段和文件信息
using?System;
using?System.IO;
using?System.Net;
?
///?
///?web地址:???http://djk8888csdn.3vcm.net/
///?FTP地址: ftp://013.3vftp.com/
///?FTP賬號: djk8888csdn
///?FTP密碼: 123456??
///?
public?class?FtpWeb
{
????public?static?string?ftpHost?=?“ftp://013.3vftp.com/“;//FTP的ip地址或域名?
????public?static?string?ftpUserID?=?“djk8888csdn“;//ftp賬號
????public?static?string?ftpPassword?=?“123456“;//ftp密碼
?
????///?
????///?上傳
????///?
????///?ftp上的路徑
????///?ftp上的文件名
????///?文件大小
????///?本地文件流
????///?報錯信息
????///?
????public?static?bool?Upload(string?ftpURI?string?filenam
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2469??2020-05-22?09:32??index.aspx
?????文件???????5469??2020-05-22?09:33??index.aspx.cs
?????文件????????969??2020-05-22?09:33??ftpDownload.ashx
?????文件???????5926??2020-05-22?09:34??FtpWeb.cs
-----------?---------??----------?-----??----
????????????????14833????????????????????4
評論
共有 條評論