On 07/30/2009 08:53 AM, Peter Ford wrote:
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'
Fedora11 (2.6.29.6-213.fc11.i586)
$ file excel.xls
excel.xls: CDF V2 Document, Little Endian, Os: Windows, Version 5.1,
Code page: 1252, Author: ??????????????????????????, Last Saved By:
ELAN, Name of Creating Application: Microsoft Excel, Last Printed: Sun
Nov 6 18:04:20 2005, Create Time/Date: Tue Nov 1 02:56:47 2005,
Security: 0
$ file -i excel.xls
excel.xls: application/vnd.ms-excel; charset=binary
Using 5.2.9, the OP's script prints:
application/vnd.ms-excel; charset=binary
I wonder if the problem lies with the documents themselves. Last May, I
posted a msg here about how FileInfo was reporting back
"application/msword application/msword" for some (but not all) Word
docs. I never received a reply about it but came up with a hack to split
on the space, if present.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php