best way to determine mime type of file these days?
best way to determine mime type of file these days?
am 17.03.2010 19:56:27 von rpjday
i realize it sounds trivial but the online info is annoyingly
recursive. there's mime_content_type(), but it's officially
deprecated. there's getimagesize() but, as i read it, it's only good
for images and i'm going to want to categorize audio and video files.
finally, numerous people refer to the PECL FileInfo extension but, in
the same breath, admit that a lot of folks have problems with it so
you might want to drop back to the (deprecated) mime_content_type()
routine.
thoughts?
rday
--
============================================================ ============
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
============================================================ ============
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: best way to determine mime type of file these days?
am 18.03.2010 08:52:47 von Per Jessen
Robert P. J. Day wrote:
>=20
> i realize it sounds trivial but the online info is annoyingly
> recursive. there's mime_content_type(), but it's officially
> deprecated.=20
On the manual page there is a reference to the Fileinfo PECL extension:=
http://php/manual/en/ref.fileinfo.php
--=20
Per Jessen, Zürich (9.1°C)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: best way to determine mime type of file these days?
am 18.03.2010 16:42:14 von TedD
At 8:52 AM +0100 3/18/10, Per Jessen wrote:
>Robert P. J. Day wrote:
>
>>
>> i realize it sounds trivial but the online info is annoyingly
>> recursive. there's mime_content_type(), but it's officially
>> deprecated.
>
>On the manual page there is a reference to the Fileinfo PECL extension:
>
>http://php/manual/en/ref.fileinfo.php
Broken.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: best way to determine mime type of file these days?
am 18.03.2010 16:50:04 von Per Jessen
tedd wrote:
> At 8:52 AM +0100 3/18/10, Per Jessen wrote:
>>Robert P. J. Day wrote:
>>
>>>
>>> i realize it sounds trivial but the online info is annoyingly
>>> recursive. there's mime_content_type(), but it's officially
>>> deprecated.
>>
>>On the manual page there is a reference to the Fileinfo PECL
>>extension:
>>
>>http://php/manual/en/ref.fileinfo.php
>=20
> Broken.
Sorry, that was a link to my local copy.=20
http://php.net/manual/en/ref.fileinfo.php
--=20
Per Jessen, Zürich (14.8°C)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php