note 28311 deleted from features.file-upload.errors by didou
| From: | didou@php.net | Date: | Sun, 27 Jul 2003 16:06:53 +0000 |
| Subject: | note 28311 deleted from features.file-upload.errors by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52747@lists.php.net to get a copy of this message | ||
Note Submitter: Sjon Hortensius
----
[Editor's note: You should use the predefined constants instead]
If you want to use a switch to display the error or succes message you can copy and paste this block
of code:
switch ($_FILES['userfile']['error']){
case 0:
echo $_FILES['userfile']['name']."(".
$_FILES['userfile']['size']." bytes)
was uploaded succesfull.";
break;
case 1:
echo "The uploaded file exceeds the
upload_max_filesize directive in php.ini.";
break;
case 2:
echo "The uploaded file exceeds the
MAX_FILE_SIZE directive that was specified in the html form.";
break;
case 3:
echo "The uploaded file was only partially
uploaded.";
break;
case 4:
echo "No file was uploaded.";
break;
case 5:
echo "Uploaded file size 0 bytes";
break;
}