Re: File content type

From: Date: Fri, 23 Feb 2001 13:12:39 +0000
Subject: Re: File content type
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41304@lists.php.net to get a copy of this message
On Fri, Feb 23, 2001 at 11:08:08AM -0000, Matt wrote: > I've written a script to upload image files to a server but need to > check to make sure there image files so I used the image type posted by > the browser but that changes depending on the system/browser set-up. > What I need to do is open the file once its on the server then get the > content type so it will always be the same if its valid. > > Does > anyone know how to do this? I normally check the mime type to make sure it is a valid image type. Just check $picture_type for image/pjpeg, image/jpeg, image/gif, etc. -- Jason Stechschulte jpstech@unoh.edu -- #define NULL 0 /* silly thing is, we don't even use this */ -- Larry Wall in perl.c from the perl source code

« previous php.general (#41304) next »