Uploadify3.1 5M The following files show success, actually did not pass the success

Source: Internet
Author: User
Uploadify3.1 upload 5M above file display success, actually did not upload successfully
PHP Uploadify3.1 upload more than 4M can be uploaded successfully, upload large points, progress bar and hints are displayed successfully, but the actual file is not uploaded successfully, debugging environment IIS6
, you can confirm the path is not a problem, the operation should be no problem, is not uploadify itself can not upload large files? There is no other good upload large file php plugin introduction.
JS code is as follows
JScript Code
  $ (function () {$ (' #file_upload '). Uploadify ({' swf ': ' uploadify.swf ', ' uploader ': ' Uplo            Adify.php ', ' buttontext ': ' Upload ', ' auto ': false, ' height ': $, ' width ': 50,             ' Cancelimage ': ' uploadify-cancel.png ', ' checkexisting ': ' check-exists.php ', ' multi ': false, ' Filedataname ': ' Filedata ', ' filetypedesc ': ' FLV video files and picture files ', ' filetypeexts ': ' *.flv;*.jpg; *.iso ', ' onuploaderror ': function (file,errorcode,errormsg,errorstring,swfuploadifyqueue) {alert (errormsg);//upload file error is triggered (each error file triggered once)}, ' Onuploadsuccess ': function (file,data,response) {A  Lert (' ID: ' + file.id+ '-index: ' + file.index+ '-file name: ' + file.name + '-File size: ' + file.size+ '-type: ' + file.type+ ')  -Date Created: ' + file.creationdate+ '-Date Modified: ' + file.modificationdate+ '-File Status: ' + File.filestatus + '-server-side message: ' + data+ '-Upload success: ' + response);    }//Your options here}); });


PHP upload file uploadify.php code as follows
PHP Code
  
   $targetFolder = '/uploads '; Relative to the Rootif (!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 ', ' FLV ', ' ISO ');//file extensions    $ Fileparts = PathInfo ($_files[' Filedata ' [' name ']);        if (In_array ($fileParts [' extension '], $fileTypes)) {        move_uploaded_file ($tempFile, $targetFile);        echo ' 1 ';    } else {        echo ' Invalid file type. ';    }}




------Solution--------------------
It's not the program, it's the environment. Upload Size
------Solution--------------------
discuss

Big Brother, can you tell me the details of this upload are not uploaded on the block?
If not, the estimate of the block must not be uploaded.

------Solution--------------------
if (!empty ($_files)) {
if ($_files[' Filedata ' [' ERROR ']! = 0) die (' Error number: '. $_files[' Filedata ' [' Error ']);
$tempFile = $_files[' Filedata ' [' tmp_name '];
....
------Solution--------------------
PHP.ini setting max_post_size greater than or equal to 5m is OK.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.