问题
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