David Ferreira - 2008-06-19 14:29:37 -
In reply to message 2 from Olaf Lederer
You can fix that deprecated function of mime_content_type, using this instead...
if (!function_exists('mime_content_type'))
{
function mime_content_type($file, $method = 0)
{
if ($method == 0)
{
ob_start();
system('/usr/bin/file -i -b ' . realpath($file));
$type = ob_get_clean();
$parts = explode(';', $type);
return trim($parts[0]);
}
else if ($method == 1)
{
// another method here
}
}
}