PHP Fatal error: Call to undefined function exif_imagetype()

橙三吉。 提交于 2021-01-29 15:52:04

问题


I got a photo competition that seems to work fine but when I upload a photo I get a blank screen. I checked the error log and found this:

PHP Fatal error: Call to undefined function exif_imagetype() in /home/fbtabvhk/public_html/pinkdrive_selfie/contest/libs/upload/save.php on line 27

This is the code on line 27:

if (exif_imagetype($_FILES['files']['tmp_name'][0]) === FALSE)

回答1:


You have to have the exif extension compiled and enabled for this function to work. This extension has good chances to be already compiled in your PHP installation, so you might just have to enable it in your php.ini:

On Linux:

extension=exif.so

On Windows:

extension=php_exif.dll

Note for Windows:

Windows users must enable both the php_mbstring.dll and php_exif.dll DLL's in php.ini. The php_mbstring.dll DLL must be loaded before the php_exif.dll DLL so adjust your php.ini accordingly.




回答2:


Try to enable your php.ini and restart server.

extension=php_exif.dll


来源:https://stackoverflow.com/questions/23978360/php-fatal-error-call-to-undefined-function-exif-imagetype

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!