Addressed to: "Kenneth R Zink II" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Kenneth R Zink II" <[EMAIL PROTECTED]> Wed, 21 Feb 2001 11:42:28 
-0600
>
> ------=_NextPart_000_00AC_01C09BFB.5E254010
> Content-Type: text/plain;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> I was just reading at DevShed on how to use Regular Expressions, but now =
> I'm even more confused.
>
> Can someone please explain how I would use a REGEX to determine in and =
> uploaded file is a .gif or .jpg file?


if( ereg( 'gif|jpg', $filename ))


Better yet, try doing a getImageSize() on the uploaded file, before you
move it and look at the [2] element of what is returned.  This will give
you the actual type of file from inspecting its contents rather than
just trusting the extension that was typed.


   http://www.php.net/manual/en/function.getimagesize.php



Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to