On 29 Jan 2004 at 10:47, craig wrote: > specifally, you want: $_FILES['userfile']['type'] = The mime type of > the file, if the browser provided this information. An example would > be "image/gif".
That's basically it and will work for common file types. However, it's the user's browser, not PHP, that identifies the MIME type of the file and sends this information along with the file. This means, first, that some browsers will send you the information (or the *correct*) information while others may not, and, second, that some file types will not be recognized by the user's browser and the file type available to PHP will be an empty string. So, as you can see, you can't really rely on this kind of information for anything critical to your application. Cheers, Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php