隨筆-39  評論-33  文章-0  trackbacks-0

          newxy1.02文件上傳到文件夾、到數據庫的方法如下:?

          1.上傳文件到服務器文件夾中的方法:
          <%@ page contentType="text/html; charset=GBK" %>
          <%@ taglib uri="/WEB-INF/newxy-html.tld" prefix="nhtml"%>
          <%@ taglib uri="/WEB-INF/newxy-logic.tld" prefix="nlogic"%>

          <nlogic:action1 id="act1" formName="fileForm"/>
          <nhtml:form action="" formName="fileForm" enctype="multipart/form-data">
          ? 文件夾:<input type="text" name="_directory" size="40"/><br />
          ? 文件1,不大于1024K:<nhtml:file property="file1" size="40" maxSize="1024"/><br />
          ? 文件2,不大于1024K:<nhtml:file property="file2" size="40" maxSize="1024"/><br />
          </nhtml:form>
          <nhtml:button actionId="act1" method="upload"/>

          2.上傳文件到數據庫中的方法:
          <%@ page contentType="text/html; charset=GBK" %>
          <%@ taglib uri="/WEB-INF/newxy-html.tld" prefix="nhtml"%>
          <%@ taglib uri="/WEB-INF/newxy-logic.tld" prefix="nlogic"%>

          <nlogic:action1 id="act1" formName="fileForm"/>
          <nhtml:form action="" formName="fileForm" enctype="multipart/form-data">
          ? 數據庫表名:<input type="text" name="_table" size="40"/><br />
          ? 說明:<input type="text" name="explain" size="40"/><br />
          ? 文件1,不大于1024K:<nhtml:file property="file1" size="40" maxSize="1024"/><br />
          ? 文件2,不大于1024K:<nhtml:file property="file2" size="40" maxSize="1024"/><br />
          </nhtml:form>
          <nhtml:button actionId="act1" method="update"/>

          不寫一句java代碼。

          newxy技術網站:http://www.newxy.net
          有關文件上傳:
          ? 文件上傳至文件夾: http://www.newxy.net/doc.jsp#anchor15.1
          ? 文件上傳至數據庫: http://www.newxy.net/doc.jsp#anchor15.2
          ? 文件上傳至文件夾與上傳至數據庫的比較:http://www.newxy.net/doc.jsp#anchor15.3
          有關范例:
          ? http://www.newxy.net/zh_cn/samples/sample2/demo.jsp

          posted on 2006-07-05 16:46 newxy新坐標 閱讀(219) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 泰州市| 北票市| 清徐县| 无为县| 鞍山市| 凤庆县| 延寿县| 峨边| 濉溪县| 云浮市| 中卫市| 保德县| 迁安市| 宝应县| 扎鲁特旗| 多伦县| 德惠市| 保德县| 景东| 永顺县| 永嘉县| 和林格尔县| 榕江县| 嘉祥县| 芮城县| 梁平县| 陈巴尔虎旗| 虹口区| 桑日县| 金塔县| 襄汾县| 方城县| 五大连池市| 鲜城| 乌兰察布市| 金川县| 镇巴县| 吐鲁番市| 金坛市| 集安市| 侯马市|