Find Mime type of file or url using php for all file format
问题 Hi I am looking for best way to find out mime type in php for any local file or url. I have tried mime_content_type function of php but since it is deprecated I am looking for better solution in php for all file format. mime_content_type — Detect MIME Content-type for a file ***(deprecated)*** I have already tried below function echo 'welcome'; if (function_exists('finfo_open')) { echo 'testing'; $finfo = finfo_open(FILEINFO_MIME); $mimetype = finfo_file($finfo, "http://4images.in/wp-content