note 52901 deleted from features.file-upload.errors by nlopess
| From: | nlopess@php.net | Date: | Tue, 17 May 2005 12:58:47 +0000 |
| Subject: | note 52901 deleted from features.file-upload.errors by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-89538@lists.php.net to get a copy of this message | ||
Note Submitter: mh
Reason: useless
----
if($_FILES['FILE']['error']) {
switch($_FILES['FILE']['error']) {
case '0':
// There is no error, the file uploaded with success.
//UPLOAD_ERR_OK
break;
case '1':
//The uploaded file exceeds the upload_max_filesize directive in php.ini.
$error = 'UPLOAD_ERR_INI_SIZE';
$error = 'UPLOAD_ERR_INI_SIZE';
break;
case '2':
//The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
$error = 'UPLOAD_ERR_FORM_SIZE';
break;
case '3':
//The uploaded file was only partially uploaded.
$error = 'UPLOAD_ERR_PARTIAL';
break;
case '4':
// No file was uploaded.
$error = 'UPLOAD_ERR_NO_FILE';
break;
case '6':
// Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.
$error = 'UPLOAD_ERR_NO_TMP_DIR';
break;
default:
break;
}
}