Is using an OS's functions for retrieving file content type reliable (using PHP < 5.3)?
- by letseatfood
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.