我在使用uploadify时遇到问题,在我的fupload.php上,$ _FILES ['Filedata'] ['name']为空。
upload.js:
$(function() {
$('#fichier').uploadify({
'swf' : '/uploadify/uploadify.swf',
'uploader' : '/fonctions/fupload.php', // /uploadify/uploadify.php
'multi' : true,
'auto' : false, //files automatically upload when they are added to the queue
'cancelImage' : '/uploadify/uploadify-cancel.png',
'onUploadStart' : function(file) {
$('#file_upload').uploadify("settings", 'formData', {'nomFichier': $('#nomFichier').val() },
{'isUploadify': $('#isUploadify').val() },
{'passphrase': $('#passphrase').val() },
{'motdepasse': $('#motdepasse').val() },
{'commentaire': $('#commentaire').val() },
{'mail1': $('#mail1').val() },
{'mail1': $('#mail2').val() },
{'mail1': $('#mail3').val() },
{'mail1': $('#mail4').val() },
{'mail1': $('#mail5').val() },
{'mail1': $('#mail6').val() },
{'mail1': $('#mail7').val() },
{'mail1': $('#mail8').val() },
{'mail1': $('#mail9').val() },
{'mail1': $('#mail10').val() },
{'mail1': $('#mail11').val() },
{'mail1': $('#mail12').val() },
{'mail1': $('#mail13').val() },
{'mail1': $('#mail14').val() },
{'mail1': $('#mail15').val() });
},
'onUploadSuccess' : function(file, data, response) {
},
'onUploadError' : function(file, errorCode, errorMsg, errorString) {
},
'onUploadComplete' : function(file) {
}
});
});
function envoieUploadify() {
$('#fichier').uploadify('upload','*');
}
我在表单中制作了js控件,我调用了envoieUploadify()函数,并在文件fupload.php $ _FILES ['Filedata'] ['name']为空 我是用一个小文件做的。有什么不对吗?
谢谢! :)