Re: checking image extensions
| From: | John Vanderbeck | Date: | Sat, 17 Feb 2001 16:26:46 +0000 |
| Subject: | Re: checking image extensions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40353@lists.php.net to get a copy of this message | ||
> Hi, Newbie question here. I'm trying to write a function to check an image
> extension, part of the code is:
>
> if (substr($imgName, -4) != ".jpg")
if ((substr($imgName, -4) != ".jpg") || (substr($imgName, -4) != ".gif"))
{
echo "<P CLASS=Error>I'm sorry, but the ikmage format you submitted is not
a supported format.</P>";
}
- John Vanderbeck
- Admin, GameDesign