php - mime_content_type script replacement assistance -
i running on newer version of php, , depreciation of mime_content_type after loading github php script 2 sections of in it, wondering if might able can replace with?
if (!function_exists('mime_content_type')) { throw new exception('program needs fileinfo php extension.'); }
and
$mimetype = mime_content_type($image); if ($mimetype != 'image/png' && $mimetype != 'image/jpg' && $mimetype != 'image/gif') { user_error('image mime type ' . $mimetype . ' not supported. image ignored', e_user_warning); return false; }
any assistance appreciated
thanks
robert