日期:2014-05-17  浏览次数:20836 次

多文件上传问题! 一个浏览按钮, 可以选择多个文件!
怎么做? 数据库 那边又 是怎么存? 取文件路径、名字什么。。

有人可以介绍介绍吗? 有参考代码最好了。。。

------解决方案--------------------
标准的 HTML 无法实现,但可以通过 Flash 来打开可选择多个文件的对话框。
------解决方案--------------------
使用无具上传。数据接收的时候。以个字符隔开即可。。如:| 这个符号。
然后在查询的时候使用分割技术查询出来。。
我现在刚到北京。没有自己的电脑不能帮你看看。不好意思啊。。
------解决方案--------------------
根据上传上来的东西保存,分割提取,就可以实现了。
------解决方案--------------------
你可以做 一个上传 然后 做个无限选择的上传按钮 然后数据库里 存路径和名称 用;或者,等把多个文件的路径和名称分开 取的时候用数组 就可以了!!
------解决方案--------------------
如果是一次可以选择多个文件的话,一般用flash(很多个人控件都这么做)
保存的时候就简单了,文件组循环保存就行了
------解决方案--------------------
我做过多个文件上传的,是用FSO读取该文件夹的所有文件,并且上传,我是为了批量传图片做的,你要只选择几个文件,就先把那些文件存在同一个文件夹了。这样就可以实现了。
------解决方案--------------------
如果你用.net平台就可以,它里面有多文件上传功能
很简单的



------解决方案--------------------
这个你用HTML的file控件是不可能做到的
只能是你自己做一个控件
------解决方案--------------------
最好的就是用FLASH方式了
------解决方案--------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无刷新多文件上传</title>
</head>
<body>
<style>
.fu_list {
width:600px;
background:#ebebeb;
font-size:12px;
}
.fu_list td {
padding:5px;
line-height:20px;
background-color:#fff;
}
.fu_list table {
width:100%;
border:1px solid #ebebeb;
}
.fu_list thead td {
background-color:#f4f4f4;
}
.fu_list b {
font-size:14px;
}
/*file容器样式*/
a.files {
width:90px;
height:30px;
overflow:hidden;
display:block;
border:1px solid #BEBEBE;
background:url(img/fu_btn.gif) left top no-repeat;
text-decoration:none;
}
a.files:hover {
background-color:#FFFFEE;
background-position:0 -30px;
}
/*file设为透明,并覆盖整个触发面*/
a.files input {
margin-left:-350px;
font-size:30px;
cursor:pointer;
filter:alpha(opacity=0);
opacity:0;
}
/*取消点击时的虚线框*/
a.files, a.files input {
outline:none;/*ff*/
hide-focus:expression(this.hideFocus=true);/*ie*/
}
</style>
<form id="uploadForm" action="file.jsp">
<table border="0" cellspacing="1" class="fu_list">
<thead>
<tr>
<td colspan="2"><b>上传文件</b></td>
</tr>
</thead>
<tbody>
<tr>
<td align="right" width="15%" style="line-height:35px;">添加文件:</td>
<td><a href="javascript:void(0);" class="files" id="idFile"></a> <img id="idProcess" style="display:none;" src="img/loading.gif" /></td>
</tr>
<tr>
<td colspan="2"><table border="0" cellspacing="0">
<thead>
<tr>
<td>文件路径</td>