fileinfo returning wrong mime type for Excel files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux