note 28311 added to features.file-upload.errors

From: Date: Thu, 09 Jan 2003 00:09:11 +0000
Subject: note 28311 added to features.file-upload.errors
Groups: php.notes 
Request: Send a blank email to php-notes+get-41872@lists.php.net to get a copy of this message
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; } -- http://www.php.net/manual/en/features.file-upload.errors.php http://master.php.net/manage/user-notes.php?action=edit+28311 http://master.php.net/manage/user-notes.php?action=delete+28311 http://master.php.net/manage/user-notes.php?action=reject+28311

« previous php.notes (#41872) next »