fileinfo returning wrong mime type for Excel files

From: Date: Wed, 29 Jul 2009 21:15:38 +0000
Subject: fileinfo returning wrong mime type for Excel files
Groups: php.general 
Request: Send a blank email to php-general+get-296034@lists.php.net to get a copy of this message
Consider the following: $finfo = finfo_open( FILEINFO_MIME, '/usr/share/file/magic' ); if( $finfo ) { $mimeType = finfo_file( $finfo, '/path/to/my/excel.xls' ); finfo_close($finfo); } echo $mimeType; When I run the above, it echoes out "application/msword". Why? I understand that both excel and word are part of the office suite but why isn't it returning "application/excel" as it should? As far as I can tell, we're using the most up to date version of fileinfo for PHP 5.2.5. Is there something else I'm missing? Or doing wrong? thnx, Christoph

« previous php.general (#296034) next »