0

我有以下 Jquery 代码来上传图片库的图片文件。它在本地运行良好,但在实时站点中,在上传图像文件时发生 HTTP 错误

<script type="text/javascript" src="uploadifyit/swfobject.js"></script>
<script type="text/javascript" src="uploadifyit/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {

    //alert('I am ready to use uploadify!');
    $("#file_upload").uploadify({
        'uploader': 'uploadifyit/uploadify.swf',
        'script': 'uploadifyit/uploadify.php',
        'cancelImg': 'uploadifyit/cancel.png',
        'folder': 'photogallery',
        'auto': false, // use for auto upload
        'multi': true,
        'queueSizeLimit': 100,
        'onQueueFull': function(event, queueSizeLimit) {
            alert("Please don't put anymore files in me! You can upload Only 50 files");
            return false;
        },
        'onComplete': function(event, ID, fileObj, response, data) {
            // you can use here jQuery AJAX method to send info at server-side.
            $.post("insertphoto.php", { name: fileObj.name }, function(info) {
                //alert(info); // alert UPLOADED FILE NAME
            }); alert("Photos Uploaded Successfully.....");     

        }

    });



});

</script>
4

0 回答 0