# note not sure where the file extension is within param, # I am assuming at end of string, anchoring the regex # to the end will speed it up slightly $regex = '\.(gif|jpg|jpe[g]?|jfif)(\s+|)$'; if ($filename !~ /$regex/o) { error("Your image needs to be in GIF or JPEG format."); }
In reply to Re: Checking File Types
by l2kashe
in thread Checking File Types
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |