Php 修改blueimp jquery上载程序
我正在修改这段代码,以便在我的php web中使用。我将代码添加到index.php中,但我不知道在哪里添加Php 修改blueimp jquery上载程序,php,jquery,blueimp,uploader,Php,Jquery,Blueimp,Uploader,我正在修改这段代码,以便在我的php web中使用。我将代码添加到index.php中,但我不知道在哪里添加客户端文件上传初始化:部分代码 下面是我用来将上传程序插入mysql数据库的代码 客户端文件上载初始化: $('#fileupload').fileupload({ url: 'server/php/' }).on('fileuploadsubmit', function (e, data) { data.formData = data.context.find(':inp
客户端文件上传初始化:
部分代码
下面是我用来将上传程序插入mysql数据库的代码
客户端文件上载初始化:
$('#fileupload').fileupload({
url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
data.formData = data.context.find(':input').serializeArray();
});
在文件main.js中,为下面的旧代码添加注释
/*
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: 'server/php/'
});
*/
添加新代码:
$('#fileupload').fileupload({
url: 'server/php/'
}).on('fileuploadsubmit', function (e, data) {
data.formData = data.context.find(':input').serializeArray();
});