How to set a mime type on a file with php? -
i writing unit test class , need generate few files different mime-types.
i know how set mime-type when sending file remote user (ala header()
), how when using fwrite()
on local server?
for file generated in method mime-type derived straight file extension?
i'm using php 5.3.x on ubuntu 12.04
files don't have mime types. identified file extensions. mime types set file extensions in /etc/mime.types
. mime type tell client programme utilize open file.
php mime-types fwrite
No comments:
Post a Comment