Javascript FileDrop.js&;来自数据的PHP未通过,但pic正常工作

Javascript FileDrop.js&;来自数据的PHP未通过,但pic正常工作,javascript,php,jquery,file-upload,filedrop.js,Javascript,Php,Jquery,File Upload,Filedrop.js,上传文件时,我正试图使用FileDrop.js在php文件中选择带有图片的框数据 除了传递选择框值外,我的代码工作正常 我的代码: dropbox.filedrop({ paramname:'pic', data: { param1: function () { return $('#opt').value(); } }, maxfiles: 50,

上传文件时,我正试图使用FileDrop.js在php文件中选择带有图片的框数据

除了传递选择框值外,我的代码工作正常

我的代码:

dropbox.filedrop({
    paramname:'pic',
    data: {
        param1: function () {             
            return $('#opt').value();
        }
    },
    maxfiles: 50,
                maxfilesize: 2,
    url: 'post_file.php',
    uploadFinished:function(i,file,response){
        $.data(file).addClass('done');

    },
                afterAll: function() {

    location.reload();
},

    error: function(err, file) {
        switch(err) {
            case 'BrowserNotSupported':
                showMessage('Your browser does not support HTML5 file uploads!');
                break;
            case 'TooManyFiles':
                alert('Too many files! Please select '+maxfiles+' at most! (configurable)');
                break;
            case 'FileTooLarge':
                alert(file.name+' is too large! Please upload files up to '+maxfilesize+' (configurable).');
                break;
            default:
                break;
        }
    },

    beforeEach: function(file){
        if(!file.type.match(/^image\//)){
            alert('Only images are allowed!');
            return false;
        }
    },

    uploadStarted:function(i, file, len){
        createImage(file);
    },

    progressUpdated: function(i, file, progress) {
        $.data(file).find('.progress').width(progress);
    }

}); 
另外,我用来接收(测试)post数据的php代码是

$pic = $_FILES['pic'];
$option = $_POST['param1'];

    print'<pre>';
    print_r($pic);

    print'</pre>';



    print'<pre>';
    print_r($option);

    print'</pre>';
$pic=$\u文件['pic'];
$option=$_POST['param1'];
打印“”;
印刷品(港币);;
打印“”;
打印“”;
打印(可选);
打印“”;
这里pic有值,但param1在脚本运行时没有任何值

我的html


图像信息
1
2
把图片放到这里上传
(一次最多上载50张图像)
<div id="styledModal2" class="modal modal-styled fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <form class="block-content dropzone" action="" method="post">
                <div class="modal-header">
                    <h1>Image Information</h1>
                </div>
                <div class="modal-body">

                    <select id="opt" name="opt">

                        <option value="1" selected="selected">1</option>
                        <option value="2">2</option>

                    </select>

                    <div id="dropbox">
                        <span class="message">Drop images here to upload. <br /><i>(MAX UPLOAD 50 IMAGE AT ONCE)</i></span>
                    </div>
                </div>
        </div>
        </form>
    </div>
</div>

</div>