PDA

View Full Version : Mime Types - IE


NancyJ
06-06-2006, 03:31 PM
I'm having a problem with Mime Types in IE. Now on my machine I have no problem but our clients - who incidentally are using the same version of IE and XP as we are are having difficulties.
The mime type that IE is sending is different on their machine than on ours. Its identifying a csv as an excel file - application/vnd.ms-excel now if I allow that then it will allow xls files as uploads - which we dont want. I dont know what to do or what to suggest to the clients.

Kid Charming
06-07-2006, 04:02 AM
This a completely random guess I'm too laz...erm, sleepy, to test.

If your client has assigned .csv files to open in Excel, XP may be masking/wrapping their MIME's with Excel's. If you're using the $_FILES type entry to check, it will give you that Excel wrapper. I think you should be able to use either mime_content_type() (http://us2.php.net/manual/en/function.mime-content-type.php) or finfo_file() (http://us2.php.net/manual/en/function.finfo-file.php) to get the file's true MIME type, though.