How to detect MIME Content-type for a file in PHP

2 Answers

0 votes
echo mime_content_type('d:\\test.php');


/*
run: 

text/html 

*/

 



answered Jul 5, 2016 by avibootz
0 votes
echo mime_content_type('d:\\test-font.png');


/*
run: 

image/png 

*/

 



answered Jul 5, 2016 by avibootz
...