Jump to content

Get Filetype


me1000

Recommended Posts

How do you get the MIME (filetype) of a file that is on your server?

 

for example:

 

the path of the file is

/users/root/123/file.jpg

 

so

 

$file = '/users/root/123/file.jpg';

 

is there a PHP function to get the MIME info from that file?

which in this case would be

 

image/jpeg

 

Thanks,

 

 

Link to comment
https://forums.phpfreaks.com/topic/91420-get-filetype/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.