较大的文件没有被上传,并使用uploadify反映


Larger file not getting uploaded and reflected using uploadify

我正在使用uploadify插件上传文件并更新mysql数据库中的文件。

较小的文件很容易上传,即在数据库中上传和更新的文件不到1 mb。但是超过4兆左右的更大的文件没有被上传。

这是我的代码:`

$j('#file_upload').uploadify({
        auto : false,
        'swf'      : 'uploadify/uploadify.swf',
        'uploader' : 'newuploadify.php',
        // Put your options here
        'queueSizeLimit' : 1,
        'multi'    : false,
        'buttonText' : 'Add Photo',
        'fileTypeDesc' : 'Image Files',
        'fileTypeExts' : '*.gif; *.jpg; *.png; *.JPG',
        'fileSizeLimit' : '10MB',
        'onClearQueue' : function(queueItemCount) {
               $j("#photocancelbtn").hide();
               $j("#photouploadstartbtn").hide();
        },
        'onSelect' : function(file) {
              $j("#photocancelbtn").show();
              $j("#photouploadstartbtn").show();
        },
        'onUploadSuccess' : function(file, data, response) {
                $j("#photocancelbtn").hide();
               $j("#photouploadstartbtn").hide();
               changeBtnText();
    }

    }); /* closing uploadify line*/
}); /* closing funciton line*/
});

`

上传脚本:

`

<?php
/*
Uploadify
Copyright (c) 2012 Reactive Apps, Ronnie Garcia
Released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
// Define a destination
require('newconnect.php');
$targetFolder = '/Mysite/uploadify/'; // Relative to the root
if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
    $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];
    // Validate the file type
    $fileTypes = array('jpg','jpeg','gif','png'); // File extensions
    $fileParts = pathinfo($_FILES['Filedata']['name']);
    if (in_array($fileParts['extension'],$fileTypes)) {
    $fp     = fopen($tempFile, 'r');
    $data = fread($fp, filesize($tempFile));
    fclose($fp);
    $query = $mysqli->prepare("Update help.posts set Photo=? where Pid=?");
           $query->bind_param("si", $data,$pid);
           $pid=3;
           $query->execute();

    } else {
        echo 'Invalid file type.';
    }
}
?>

`

请告诉我出了什么错误。我可以上传较小的文件,但不能上传较大的文件,尽管我设置的上传限制是10 mb,并且还将php.ini的最大文件大小更新为10 mb

好的,问题解决了!问题出在文件格式上。脚本没有采用.JPG(大写),但采用.JPG