FTP代码

xiaoxiao2021-02-28  53

FTPClient ftp = new FTPClient(); ftp.connect("ip");//连接FTP服务器 ftp.login("usrname", "password");//登录 int reply = ftp.getReplyCode(); ftp.changeWorkingDirectory(dirPath); FileInputStream input = new FileInputStream(new File(filePath)); ftp.storeFile(fileName, input); input.close(); ftp.logout();
转载请注明原文地址: https://www.6miu.com/read-2619352.html

最新回复(0)