Re: a clean way to upload

From: Date: Fri, 16 Jan 2004 15:55:55 +0000
Subject: Re: a clean way to upload
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-174834@lists.php.net to get a copy of this message
Thanks Jason. How would I do that? I mean, what would I put instead of > > if ($_FILES['imagefile']['type'] != "image/pjpeg") thanks "Jason Wong" <php-general@gremlins.biz> wrote in message news:200401161042.45877.php-general@gremlins.biz... > On Friday 16 January 2004 10:32, Matt Hedges wrote: > > > if ($_FILES['imagefile']['type'] != "image/pjpeg") > > The 'type' in $_FILES is provided by the browser. IIRC only IE uses > "image/pjpeg" whilst other browsers use "image/jpeg". But regardless of what > the browser sets, it is more reliable to get the image type from > getimagesize(). > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > Pecor's Health-Food Principle: > Never eat rutabaga on any day of the week that has a "y" in it. > */

« previous php.general (#174834) next »