Is using an OS's functions for retrieving file content type reliable (using PHP < 5.3)?

Posted by letseatfood on Stack Overflow See other posts from Stack Overflow or by letseatfood
Published on 2010-06-12T01:10:31Z Indexed on 2010/06/12 1:12 UTC
Read the original article Hit count: 277

Filed under:
|
|

I am using PHP versions < 5.3. Is it reliable to use the OS's functions for retrieving file content types? I am just trying to make sure that files are of a specific type before displaying them in a browser. I don't want to rely on just using the file extension.

mime_content_type() is deprecated and I do not have the PECL Fileinfo extension.

In my case I am using Windows or Linux for my development servers, depending on the job.

© Stack Overflow or respective owner

Related posts about php

Related posts about content-type