Blueimp 論壇首頁


列印 2024/4/19 下午 01:10:33

文章作者 jieh2008/7/31 下午 12:10:13
biggrin   Struts Upload
laughing 只有我看得懂...

Jar:libs/tools/upload/cos.jar

View:

<form action=VPMS2100.do method=post enctype=multipart/form-data>
<input type=file name=visitForm>
</form>

Ctrl:

org.apache.struts.upload.FormFile file = mForm.getVisitForm();
file.getInputStream();


用法一:

LineNumberReader lnr = new LineNumberReader(new BufferedReader(new FileReader(do_file)));


lnr.getLineNumber(); 好用喔,不管是用來 debug 產生 error log,還是結束做個總資料行數檢核,就是省下你 count++ 算個不停而已,code 比較好看。
----------------------------------------
支持小惡魔
BTC : 19tn3RnCuwZVukXAwyhDWZD4uBgUZoGJPx
LTC : LTFa17pSvvoe3aU5jbmfcmEpo1xuGa9XeA
知識跟八卦一樣,越多人知道越有價值;知識最好的備份方法,散播!
藍色小惡魔(林永傑): 臉書