note 54819 deleted from features.file-upload.errors by danbrown
| From: | danbrown@php.net | Date: | Mon, 27 Apr 2009 14:39:47 +0000 |
| Subject: | note 54819 deleted from features.file-upload.errors by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153829@lists.php.net to get a copy of this message | ||
Note Submitter: hans at lintoo dot dk
----
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");
}
?>