I am writing Unit Test for a class and you need to generate several files with different mime types.
I know how to set the mime type when sending a file to a remote user (ala header() ), but how to do this when using fwrite() on the local server?
For the file generated in this method, is the mime type obtained directly from the file extension?
I am using PHP 5.3.x on Ubuntu 12.04
source share