> is there a function to get the mime of a given file?  if so what?

Probably not...

For starters, PHP doesn't really know much about mime-types, because they
are defined by Apache*, not PHP.

Secondly, mime-types *can* change on the fly in different directories based
on .htaccess files, if your httpd.conf has .htaccess turned on.  ISPs turn
it on for their customers to have whatever weird-o file types they want.
Dedicated boxes turn it off and set them all in httpd.conf for a big
performance gain.  Checking for, and reading, an .htaccess file in every
directory above the current one for every single file served is pretty
expensive.  So any such function would either return suspect results (ie,
subject to change by .htaccess) or would require the URI of the file, not
just the name, and be rather slow.

Post why you think you need this function, and maybe somebody will have a
suggestion for how to work without it.

* If you are working under Windows, I have no idea how they decide what the
mime-type of a file is, and I don't really want to know...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to