On Wed, Jul 29, 2009 at 05:15:38PM -0400, Christoph Boget wrote:
> 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
Presumably, this information comes directly from /usr/share/file/magic.
FWIW, my copy of this file is in /usr/share/misc/file/magic, which is
where the man page says it should be. Debian Linux v5.
Paul
--
Paul M. Foster
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php