Re: MimeTypes

From: Date: Wed, 30 Aug 2000 16:15:35 +0000
Subject: Re: MimeTypes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14421@lists.php.net to get a copy of this message
On (at least RedHat) linux systems, there is a program called 'file'. You could exec() that and it would provide you with a pretty good guess of what type of file it is. You're PHP script can then handle the output of the file command and act accordingly. -jeremy > Hi, > I have the task to develop a system for uploading files via browser. I know > how to obtain the mimetypes with > <input type="file" name="upload"> so that $upload_type contains the > mimetype. What if the user submits wrong extensions e.g. "my_file.doc" is'nt > a msword-doc at all? Does anyone has experiences for obtaining mimetypes > from various browsers and platforms (Mac, Win, Unix...)? > > Thanks in advance, > Uli > > --- > TRILOS GbR > Ungerstr. 26 > 30451 Hannover > fon 0511 - 21 44 98-62 > fax 0511 - 21 44 98-65 > http://www.trilos.de > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#14421) next »