PHP $_files Error return value detailed _php tutorial

Source: Internet
Author: User
Tags php file upload
$_files[' file ' [' Error '] Value

upload_err_ok:0//Normal, upload successful

Upload_err_ini_size:1//Upload file size exceeds the maximum allowable upload value for the server, set the value of upload_max_filesize option limit in php.ini

Upload_err_form_size:2//Upload file size exceeds the value specified by the Hidden fields max_file_size option in the HTML form

Upload_err_no_tmp_dir:6//No temporary folder found

Upload_err_cant_write:7//File write failed

Upload_err_extension:8//php File upload extension not open

Upload_err_partial:3//files are only partially uploaded

Copy the Code code as follows:
Switch ($_files[$field [' ERROR ']) {

Case 1:
The file size exceeds the server's space size
$this->seterror ("The file is too large (server).");
Break

Case 2:
The file size to upload exceeds the browser limit
$this->seterror ("The file is too large (form).");
Break

Case 3:
Files are only partially uploaded
$this->seterror ("The file was only partially uploaded.");
Break

Case 4:
No files found to upload
$this->seterror ("No file was uploaded.");
Break

Case 5:
Server temp folder is missing
$this->seterror ("The Servers temporary folder is missing.");
Break

Case 6:
Error writing file to temp folder
$this->seterror ("Failed to write to the temporary folder.");
Break
}

http://www.bkjia.com/PHPjc/728100.html www.bkjia.com true http://www.bkjia.com/PHPjc/728100.html techarticle $_files[' file ' [' Error '] value upload_err_ok:0//Normal, upload successful upload_err_ini_size:1//upload file size exceeds the maximum value that the server allows to upload, Set upload_max_ in PHP.ini ...

  • Related Article

    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.