If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Getting mime-type from file (or its .ext)

I am pretty sure this can be done as it is mentioed in the docs (but as always, it talks mainly about UNIX !!)
Is there a built-in function that will return the mime-type in the form "text/plain" based upon the filedata or extension of a file on the server.
I have tried the mime_content_type(String filename) function, but an undefined function error is returned when i try to use it on my win32 system.

Failing the existance of a built in function, how easy would it be to write one, assuming the default file extensions for all mime types??