Hi,
I have the following code to get a MIME type:
$file = OFF_URL . "file/".$filename;
$finfo = finfo_open(FILEINFO_MIME_TYPE);
if (!$finfo) {
echo "Opening fileinfo database failed";
exit();
}
$fmime = finfo_file($finfo, $file);
finfo_close($finfo);
But I get the following error:
PHP Fatal error: Call to undefined function finfo_open() in …
It’s the first time I’ve used finfo, but I thought it was included with PHP 5.3.0+?
Cheers,
Rhys
EDIT: Figured it out. The extension needed activating.
Cheers