On Thu, 2009-07-30 at 21:26 -0400, b wrote:
On 07/30/2009 10:15 AM, Ashley Sheridan wrote:
On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote:
You could email it to me, which I presume is better if you replied
back just to me and not the list?
Just copying the list back on in
/usr/share/file/magic
/usr/share/file/magic has lots of rules to know its type and its just
matching it.
I know it has a lot of rules. Grepping it for excel shows that there
are rules in it for those types of files as well.
Maybe your file is quite strange . have you tried with other xls
Christoph Boget wrote:
/usr/share/file/magic
/usr/share/file/magic has lots of rules to know its type and its just
matching it.
I know it has a lot of rules. Grepping it for excel shows that there
are rules in it for those types of files as well.
Maybe your file is quite strange . have
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'
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'
$ file -i excel.xls
excel.xls:
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:
On Thu, 2009-07-30 at 09:51 -0400, Christoph Boget wrote:
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:
The xls file I am using was generated with Excel (of Office 2007) for
the Mac. So either you have a different magic file (assuming that's
what the file command uses) than I do or different versions of excel
contain different information.
I just tried using an excel spreadsheet saved using
From: Christoph Boget
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'
$ file -i
__
From: Ashley Sheridan a...@ashleysheridan.co.uk
To: Christoph Boget jcbo...@yahoo.com
Sent: Thursday, July 30, 2009 10:05:33 AM
Subject: Re: [PHP] fileinfo returning wrong mime type for Excel files
On Thu, 2009-07-30 at 07:04 -0700, Christoph Boget wrote:
To test
On 07/30/2009 10:15 AM, Ashley Sheridan wrote:
On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote:
You could email it to me, which I presume is better if you replied
back just to me and not the list?
Just copying the list back on in this one now. I don't know of any
places that you
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
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' );
13 matches
Mail list logo