public function get_content_type($path){
        if( file_exists($path) ){
            $info = finfo_open(FILEINFO_MIME);
            $type = finfo_file($info, $path) ;
            finfo_close($info);
            return $type ?: '' ;
        }else{
            return '';
        }
    }
public function get_content_type($path){
        if( file_exists($path) ){
            $info = finfo_open(FILEINFO_MIME);
            $type = finfo_file($info, $path) ;
            finfo_close($info);
            return $type ?: '' ;
        }else{
            return '';
        }
    }
public function get_content_type ( $ path ) { if ( file_exists ( $ path ) ) { $ info = finfo_open ( FILEINFO_MIME ) ; $ type = finfo_file ( $ info , $ path ) ; finfo_close ( $ info ) ; return $ type ? : '' ; } else { return '' ; } }
Get content type

@param string $path
@return string
Get content type