>>>>> "p" == php3 <[EMAIL PROTECTED]> writes:
> Addressed to: "Kenneth R Zink II" <[EMAIL PROTECTED]>
> [EMAIL PROTECTED]
> ** Reply to note from "Kenneth R Zink II" <[EMAIL PROTECTED]> Wed,
> 21 Feb 20= 01 11:42:28 -0600
>> ------=3D_NextPart_000_00AC_01C09BFB.5E254010 Content-Type:
>> text/plain; charset=3D"iso-8859-1" Content-Transfer-Encoding:
>> quoted-printable
>> Can someone please explain how I would use a REGEX to determine in
>> and =
> =3D
>> 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.
Or look at the mime type held in $HTTP_POST_FILES['uploadname']['type']
--
Robin Vickery.................................................
BlueCarrots, 14th Floor, 20 Eastbourne Terrace, London, W2 6LE
--
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]