Php Blueimp文件多次上传到Mysql
我正在使用BlueIMPjQuery文件上传程序上传到mysql表。 我使用的是基本的ui版本。 我正在使用此页面上找到的代码 当我一次上传一个文件时,它会上传正确的标题和描述。当我上传多个文件时,它会将文件名的行上传到MySQL fine,但在所有MySQL行字段中重复相同的数据作为标题和描述Php Blueimp文件多次上传到Mysql,php,jquery,mysql,upload,blueimp,Php,Jquery,Mysql,Upload,Blueimp,我正在使用BlueIMPjQuery文件上传程序上传到mysql表。 我使用的是基本的ui版本。 我正在使用此页面上找到的代码 当我一次上传一个文件时,它会上传正确的标题和描述。当我上传多个文件时,它会将文件名的行上传到MySQL fine,但在所有MySQL行字段中重复相同的数据作为标题和描述 <script id="template-upload" type="text/x-tmpl"> {% for (var i=0, file; file=o.files[i]; i++)
<script id="template-upload" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-upload fade">
//ADDED
<td>
<label class="title">
<span>Title:</span><br>
<input name="title[]" class="form-control">
</label>
</td>
//ADDED
<td>
<label class="description">
<span>Description:</span><br>
<input name="description[]" class="form-control">
</label>
</td>
{%for(var i=0,file;file=o.files[i];i++){%}
//增加
标题:
//增加
说明:
好的,问题解决了。我有初始化代码
$('#fileupload').fileupload({
url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
data.formData = data.context.find(':input').serializeArray();
});
在索引上传页面的头部,它需要进入main.js文件