FTP連接的辦法以及配置方式是怎樣的,很多新手對此不是很清楚,為了幫助大家解決這個(gè)難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。
成都創(chuàng)新互聯(lián)公司主要從事網(wǎng)站制作、網(wǎng)站設(shè)計(jì)、網(wǎng)頁設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)隆化,十年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):028-86922220
使用FTP上傳工具進(jìn)行遠(yuǎn)程連接

FTP用于在FTP服務(wù)器和FTP客戶端之間上傳和下載文件,它最優(yōu)秀的功能就是可以批量管理,可以將文件從一個(gè)主機(jī)傳輸?shù)搅硪粋€(gè)主機(jī)。
地址: FTP上傳工具
使用FTP上傳工具最優(yōu)秀的功能就是可以批量管理、批量上傳,適用于Windows系統(tǒng),Linux系統(tǒng)和云服務(wù)器等,能極大的提高站長及服務(wù)器運(yùn)維人員工作效率,同時(shí)FTP上傳工具還是vnc客戶端,真正實(shí)現(xiàn)了一站式管理,非常方便。
java下配置連接FTP:
public void putTxtToFTP() {
System.out.println("開始執(zhí)行定時(shí)器任務(wù):維系一鍵訂單量!");
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -1); //得到前一天
Date date = calendar.getTime();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
String yesterday = df.format(date);
StringBuffer yjtjOrderTxt = new StringBuffer();
yjtjOrderTxt.append("yjtywx_").append(yesterday).append(".txt");
List<WxActiveData> yjtjOrderList = activeDataService.wxGetYjtjOrder();
//FtpUtil ftpUtil = new FtpUtil("hexin","hx105155","134.64.105.155", "/yjtydd"); //測試庫FTP
FtpUtil ftpUtil = new FtpUtil("ahftp","ahdx@#$_123dic","192.168.0.28", "/yjtydd");
PrintWriter printWriter = null;
File highFeeFile = new File(Contants.FILE_PATH_BAK + yjtjOrderTxt);//Contants.FILE_PATH_BAK = "/opt/wss/domains/tmp/"
// File highFeeFile = new File("D:/" + highFeeTxt);
// File gjmyFile = new File("D:/" + gjmyTxt);
//File highFeeFile = new File("D:/" + yjtjOrderTxt);
try {
printWriter = new PrintWriter(new FileWriter(highFeeFile, true));
for (int i = 0; i < yjtjOrderList.size(); i++){
printWriter.println(yjtjOrderList.get(i).toString().trim());
}
} catch (IOException e) {
System.out.println("主動服務(wù) 高額數(shù)據(jù)報(bào)表任務(wù)異常!");
}finally{
printWriter.close();
}
if(highFeeFile.exists()){
System.out.println("主動服務(wù)定時(shí)器任務(wù) 高額數(shù)據(jù) 上傳成功"+yjtjOrderTxt.toString());
ftpUtil.uploadFile(highFeeFile, yjtjOrderTxt.toString());
}else{
System.out.println("主動服務(wù)定時(shí)器任務(wù) 高額數(shù)據(jù) 上傳失敗"+yjtjOrderTxt.toString());
}
System.out.println("服務(wù)器批量查排名-查詢結(jié)果");
}
public ActiveDataService getActiveDataService() {
return activeDataService;
}
public void setActiveDataService(ActiveDataService activeDataService) {
this.activeDataService = activeDataService;
}看完上述內(nèi)容是否對您有幫助呢?如果還想對相關(guān)知識有進(jìn)一步的了解或閱讀更多相關(guān)文章,請關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝您對創(chuàng)新互聯(lián)的支持。
網(wǎng)站名稱:FTP連接的辦法以及配置方式是怎樣的
文章分享:http://www.jbt999.com/article44/jeiche.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、網(wǎng)站導(dǎo)航、手機(jī)網(wǎng)站建設(shè)、企業(yè)建站、小程序開發(fā)、網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:[email protected]。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)