Consider the following:

        $finfo = finfo_open( FILEINFO_MIME, '/usr/share/file/magic' );
        if( $finfo )
          $mimeType = finfo_file( $finfo, '/path/to/my/excel.xls' );
        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?


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to