Starting with PHP 4.2.0, PHP returns a corresponding error code along with the file information array. The code can be found in the Error field in the file array generated when the file is uploaded, i.e. $_files[' userfile ' [' Error '].
Upload_err_ok
Its value is 0, no error occurred, file upload success.
Upload_err_ini_size
The value is 1, and the uploaded file exceeds the value of the Upload_max_filesize option limit in php.ini.
Upload_err_form_size
The value is 2, the size of the uploaded file exceeds the value specified by the Max_file_size option in the HTML form. Upload_err_partial
The value is 3 and the file is only partially uploaded.
Upload_err_no_file
The value is 4 and no files are uploaded.
Upload_err_no_tmp_dir
The value is 6 and the temporary folder cannot be found. PHP 4.3.10 and PHP 5.0.3 introduced.
Upload_err_cant_write
The value is 7 and the file write failed. PHP 5.1.0 introduced.
Note: The above values become PHP constants after PHP 4.3.0
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