首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

asp 怎么使用无组件上传多个图片呢? 多谢 如何循环得到呢

2012-02-19 
asp 如何使用无组件上传多个图片呢? 谢谢怎么循环得到呢?怎么做呢?!--#includefile upload_5xsoft.inc

asp 如何使用无组件上传多个图片呢? 谢谢 怎么循环得到呢?
怎么做呢?
<!--#include   file= "upload_5xsoft.inc "-->

<body>
<%  
          set   upload   =   new   upload_5xsoft
set   file=upload.file( "ad_pic ")
if       file.fileSize> 0   or   file.fileSize <2048       then
fileExt=lcase(right(file.filename,3))      
                    if   fileExt= "jpg "   or   fileExt= "gif "   or   fileExt= "png "   or   fileExt= "bmp "   then
'session( "bookimg ")   =   file.FileName+ " "
  file.saveAs   Server.mappath( "/ "+file.FileName)
'response.Write   "ok! "
ok   =   1
else
ok   =   0
response.Write( "上传类型或大小有错误 ")
end   if
end   if
set   file=nothing
set   upload=nothing
if   ok   then
'response.Redirect   "bookok.asp "
response.Write( "广告发布成功 ")
end   if

%>


  <form   action= " "   method= "post "   enctype= "multipart/form-data "   name= "FrmAdd "   onSubmit= "return   doSubmit(this) ">
                    <table   width= "92% "     border= "0 "   cellspacing= "0 "   cellpadding= "2 ">
                        <tr>
                            <td   width= "13% "   align= "right "> 广告标题:   </td>
                            <td> <input   name= "ad_name "   type= "text "   style= "width:320px ">
                                    <font   color= "#CC0000 ">   *   </font> 小于50个中文字符 </td>
                        </tr>
                        <tr>
                            <td   align= "right "> 图片: </td>
                            <td> <input   name= "ad_pic "   type= "file "   id= "news_pic "   style= "width:340px ">
                            图片在160*120px以下 </td>
                        </tr>
                        <tr>
                            <td   width= "13% "   align= "right "> 广告标题2:   </td>


                            <td> <input   name= "ad2_name "   type= "text "   style= "width:320px ">
                                    <font   color= "#CC0000 ">   *   </font> 小于50个中文字符 </td>
                        </tr>
                        <tr>
                            <td   align= "right "> 图片2: </td>
                            <td> <input   name= "ad2_pic "   type= "file "   id= "news_pic "   style= "width:340px ">
                            图片在160*120px以下 </td>
                        </tr>
<tr>
                            <td   width= "13% "   align= "right "> 广告标题3:   </td>
                            <td> <input   name= "ad3_name "   type= "text "   style= "width:320px ">
                                    <font   color= "#CC0000 ">   *   </font> 小于50个中文字符 </td>
                        </tr>
                        <tr>
                            <td   align= "right "> 图片2: </td>
                            <td> <input   name= "ad3_pic "   type= "file "   id= "news_pic "   style= "width:340px ">
                            图片在160*120px以下 </td>
                        </tr>
                        <tr>
                            <td   height= "40 "> </td>
                            <td> <input   name= "image "   type=image   src= "image/Cmd_submit.gif "   width= "70 "   height= "20 ">
                &nbsp;&nbsp;&nbsp;
                                <input   name= "image2 "   type= "image "   onClick= "javascript:document.FrmAdd.reset();return   false; "   src= "image/Cmd_reset2.gif "   width= "70 "   height= "20 "     border=0> </td>


                        </tr>
                    </table>
                </form>




[解决办法]
http://www.pifoo.com/netos/UploadFiles/showup2.rar

热点排行
Bad Request.