note 54819 added to features.file-upload.errors
| From: | hans at lintoo dot dk | Date: | Fri, 15 Jul 2005 20:18:38 +0000 |
| Subject: | note 54819 added to features.file-upload.errors | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92039@lists.php.net to get a copy of this message | ||
or perhaps this:
<?php
switch ($filearray["error"]) {
case UPLOAD_ERR_INI_SIZE:
throw new Exception("The uploaded file exceeds the upload_max_filesize directive
(".ini_get("upload_max_filesize").") in php.ini.");
break;
case UPLOAD_ERR_FORM_SIZE:
throw new Exception("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified
in the HTML form.");
break;
case UPLOAD_ERR_PARTIAL:
throw new Exception("The uploaded file was only partially uploaded.");
break;
case UPLOAD_ERR_NO_FILE:
throw new Exception("No file was uploaded.");
break;
case UPLOAD_ERR_NO_TMP_DIR:
throw new Exception("Missing a temporary folder.");
default:
throw new Exception("An unknown file upload error occured");
}
?>
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.errors.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54819
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54819&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54819&report=yes
Search -- http://master.php.net/manage/user-notes.php