疯子ftp上传工具
ftp服务器上传
ftp客户端
ftp服务器客户端
传送数据信息到服务器
reqFTP = (FtpWebRequest) WebRequest.Create(new Uri("ftp://" ftpServerIP "/" path filename));
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
reqFTP.Method = WebRequestMethods.Ftp.ListDirectory;
WebResponse response = reqFTP.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("utf-8"));
string line = reader.ReadLine();
while (line != null)
{
if (line.IndexOf(".") == -1)
{
result = result line "$";
}
else
{
result0 = result0 line "$";
}
line = reader.ReadLine();
}
result = result result0;
reader.Close();
response.Close();
s025 = 1;
return result;
评论