imgName) ) {
print "file format is not supported!";
}
> -Original Message-
> From: John Vanderbeck [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 17, 2001 08:27
> To: Alvin Tan; Php-General
> Subject: Re: [PHP] checking image extensions
>
>
> >
>
> if ((substr($imgName, -4) != ".jpg") || (substr($imgName, -4) != ".gif"))
this case, in plain english is :
if ext is not jpg, OR if ext is not gif, error
the ext will never be both jpg and gif at the same time, so you're looking
for the condition:
if ((substr($imgName, -4) != ".jpg") && (
> 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 "I'm sorry, but the ikmage format you submitted is not
a support
3 matches
Mail list logo