Description of what error was at number 5 here http://php.net/manual/ru/features.file-upload.errors.php in
$_FILES['pic']['error'] I think that once was possible in ancient versions of php?
Description of what error was at number 5 here http://php.net/manual/ru/features.file-upload.errors.php in
$_FILES['pic']['error'] I think that once was possible in ancient versions of php?
Once upon a time, in a far-away galaxy, code number 5 existed .
#define UPLOAD_ERROR_E 5 /* Uploaded file size 0 bytes */ Added on November 24, 2001, and indicated the error code in case a zero-length file was loaded. In addition, an E_WARNING generated. Severe PHP beginning of the millennium, mda.
After half a year, people thought better of it , and cut this garbage out. Zero size files can now be downloaded and the application’s PHP code can already be viewed in the size parameter and decide for itself whether he likes such a file or not.
Interestingly, in PHP code, a constant with such a value never existed. For PHP code, these constants appeared after this story and initially did not have code 5. This commit entered PHP 4.3.0 . Just in case, the value of 5 was omitted when adding and subsequent constants .
Constants from the storm. 5 is missing.
define ('UPLOAD_ERR_OK', 0); define ('UPLOAD_ERR_INI_SIZE', 1); define ('UPLOAD_ERR_FORM_SIZE', 2); define ('UPLOAD_ERR_PARTIAL', 3); define ('UPLOAD_ERR_NO_FILE', 4); define ('UPLOAD_ERR_NO_TMP_DIR', 6); define ('UPLOAD_ERR_CANT_WRITE', 7); define ('UPLOAD_ERR_EXTENSION', 8); Managed to google
5 | UPLOAD_ERROR_E | As expliained by @Progman, removed in rev. 81792 Source: https://ru.stackoverflow.com/questions/604130/
All Articles