Home > Article > Backend Development > Error type of php file upload error
The content of this article is about the error types of PHP file upload errors. It has certain reference value. Now I share it with you. Friends in need can refer to it.
1, UPLOAD_ERR_OK
The value is 0, no error occurs, and the file is uploaded successfully.2. UPLOAD_ERR_INI_SIZE##The value is 1, and the uploaded file exceeds the upload_max_filesize option limit in php.ini value.
3. UPLOAD_ERR_FORM_SIZEThe value is 2, and the size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form.
4. UPLOAD_ERR_PARTIALThe value is 3, and only part of the file is uploaded.
5. UPLOAD_ERR_NO_FILEThe value is 4 and no file is uploaded.
The value is 6 and the temporary folder cannot be found. PHP 4.3.10 and PHP 5.0.3 introduced.
The value is 7, file writing failed. PHP 5.1.0 introduced.
Related recommendations:php file operation-add data from other files to this file
php file lock solves high concurrency
The above is the detailed content of Error type of php file upload error. For more information, please follow other related articles on the PHP Chinese website!