How do I return the error
| From: | Matthew Oatham | Date: | Wed, 28 Jul 2004 13:56:16 +0000 |
| Subject: | How do I return the error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192094@lists.php.net to get a copy of this message | ||
Hi I have this function below - if it reurns false I want to also return the error so I can print it
in my calling function. Can I do this?
Cheers
Matt
function fileUpload($file) {
if ($file['type'] == "image/gif" || $file['type'] ==
"image/pjpeg"){
if (@copy ($file['tmp_name'], "images/" . $file['name']))
return true;
}else {
return false;
}
}