I'm trying to code an Index that will list the files in a directory with a specific icon next to them based on its mime type. However, I can't get any of the mime functions that I've found to work.
I tried "mime_content_type($filename)" from [
us3.php.net]
That gave me the error "mime_content_type() undefined"
Then I tried
"$finfo = finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension
echo finfo_file($finfo, $filename)"
from [
us.php.net]
This gives me the error "finfo_open() undefined"
So what do I need to do to get the mime types of these files. like "text/html" or "audio/mpeg"?
Thanks for any help.