RE: [PHP] fileinfo returning wrong mime type for Excel files

From: Date: Thu, 30 Jul 2009 13:53:29 +0000
Subject: RE: [PHP] fileinfo returning wrong mime type for Excel files
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-296062@lists.php.net to get a copy of this message
From: Christoph Boget >> Have you tried using 'file -i' from the command line: after all you are looking >> for a MIME type with your fileinfo... >> Having said that, with file -i on my system, Word documents are >> 'application/msword' and Excel files are 'application/octet-stream' > > $ file -i excel.xls > excel.xls: application/msword > > The xls file I am using was generated with Excel (of Office 2007) for > the Mac. So either you have a different magic file (assuming that's > what the file command uses) than I do or different versions of excel > contain different information. Those two statements are not mutually exclusive. Both may be true. Bob McConnell

« previous php.general (#296062) next »