note 39711 deleted from function.strrchr by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 08 Feb 2004 19:58:09 +0000 |
| Subject: | note 39711 deleted from function.strrchr by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64842@lists.php.net to get a copy of this message | ||
Note Submitter: neon@lordneon.com
----
I just found out an easy way to check if a file is an image or not:
<?php
$ext = strchr($image_type, "image");
if (!$ext) {
die("The selected file is not an image");
} else {
/* Upload the file or whatever you want */
}
?>
Hope this helps.
Cheers!