利用SA FileUp组件进行多文件上传

大家可以根据自己的实际情况进行修改,特别是数据库操作部分。
============================================
利用稻香老农的无组件进行多文件上传
请见:
http://bbs.blueidea.com/viewthread.php?tid=1249535
==================================================
本例属于文件和表单项的混合提交。

简单说明:
虽然重点在处理页上,但我觉得有必要介绍一下表单的项目。
本例是相册里像片的上传。
其中的groupID是隐藏域传递的大类的ID
其中的albumID是隐藏域传递的小类的ID
file1-->>file5是文件
photoTitle1-->>photoTitle5 是像片的标题
photoIntro1-->>photoIntro5 是像片的简介
photoWidth1-->>photoWidth5 是像片的宽度
photoHeight1-->>photoHeigth5 是像片的高度
photoSize1-->>photoSize5 是像片的大小。

注意:因本人没有声明变量的习惯,所以大家要是强制声明变量的话,就得自己加了。
===========================================

提交页:主要代码如下
<form name="fileForm" method="post" action="photo_savephoto.asp" enctype="multipart/form-data" onSubmit="return checkForm();">

<INPUT name="groupID" type="hidden" id="groupID" value="<%=groupID%>" size="10">
<INPUT name="albumID" type="hidden" id="albumID" value="<%=albumID%>" size="10">

  上传说明:最多可以同时上传五个文件,其中标题最多30字,简介200字。

<table width="96%" align="center" cellpadding="4" cellspacing="2">
    <tr align="center" valign="middle">
      <td align="left" bgcolor="#F4CECE" id="upid">文件1</td>
      <td height="29" align="left" bgcolor="#F4CECE" id="upid">            <INPUT name="file1" type="file" class="myInput" size="20">
        宽: <INPUT name="photoWidth1" type="text" class="input-disabled" id="photoWidth1" size="5" readonly="">
          高: <INPUT name="photoHeight1" type="text" class="input-disabled" id="photoHeight1" size="5" readonly="">
          大小:<INPUT name="fileSize1" type="text" class="input-disabled" id="fileSize1" size="5" readonly="">         
      </td>
    </tr>
    <tr align="center" valign="middle">
      <td colspan="2" align="left" bgcolor="#FDF2F2" id="upid">
        标题: <INPUT name="photoTitle1" type="text" class="myInput" id="photoTitle1" size="40">
          <BR>        

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3111.html