Page 1 of 1

Alternative to mime_content_type()

Posted: Thu Jan 14, 2010 1:23 pm
by shanecody
In my code i have the following:

Code: Select all

$type = mime_content_type($_FILES[$file_upload]['tmp_name']);
What would be a good alternative to this line of code now that mime_content_type is depreciated?

Re: Alternative to mime_content_type()

Posted: Thu Jan 14, 2010 1:29 pm
by requinix
shanecody wrote:What would be a good alternative to this line of code now that mime_content_type is depreciated?
This function has been deprecated as the PECL extension Fileinfo provides the same functionality (and more) in a much cleaner way.
Perhaps the Fileinfo extension?