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


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)