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.