PHP致命错误:调用未定义函数exif_imagetype() [英] PHP Fatal error: Call to undefined function exif_imagetype()

查看:91
本文介绍了PHP致命错误:调用未定义函数exif_imagetype()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我参加了一场摄影比赛,看起来不错,但是当我上传照片时却出现了空白屏幕.我检查了错误日志,发现了这一点:

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致命错误:在第27行的/home/fbtabvhk/public_html/pinkdrive_selfie/contest/libs/upload/save.php中调用未定义函数exif_imagetype()

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

这是第27行的代码:

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

推荐答案

您必须已编译并启用了exif扩展名,此功能才能正常运行.此扩展很可能已经在您的PHP安装中进行了编译,因此您可能只需要在php.ini中启用它即可.

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:

在Linux上:

extension=exif.so

在Windows上:

extension=php_exif.dll

Windows注意:

Note for Windows:

Windows用户必须同时启用php.ini中的php_mbstring.dll和php_exif.dll DLL.必须在php_exif.dll DLL之前加载php_mbstring.dll DLL,这样相应地调整您的php.ini.

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.

这篇关于PHP致命错误:调用未定义函数exif_imagetype()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆