PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
shanecody
Forum Newbie
Posts: 23 Joined: Fri May 08, 2009 4:12 pm
Post
by shanecody » Thu Jan 14, 2010 1:23 pm
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?
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Thu Jan 14, 2010 1:29 pm
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 ?