PHP:exif_read_data()未定义 [英] PHP:exif_read_data() not defined
问题描述
我现在正在学习如何从图像中提取exif.我编写了这样的简单代码:
I'm now learning how to extract exif from images.I wrote the simple code like this:
<?php
//Get the exif data
$exif_data = exif_read_data('sample.jpg');
print_r($exif_data);
?>
但是,在运行代码时,存在有关未定义的exif_read_data()的致命错误. 我是Windows用户,并且已经修改了php.ini:
But, there is a fatal error about undefined exif_read_data() when running the code. I'm a windows user, and I have modified the php.ini like this :
extension=php_mbstring.dll
extension=php_exif.dll
感谢您的帮助.
推荐答案
-
您的系统上的
Php/ext
文件夹下是否有这些DLL?Do you have these DLLs on your system under
Php/ext
folder?您在编辑
php.ini
之后重启了Apache吗?Have you restarted Apache after editing the
php.ini
?您编辑的
php.ini
是系统使用的php.ini
吗?您可以验证此读数<?php phpinfo() ?>
输出.The
php.ini
you edited is the one used by system? You can verify this reading<?php phpinfo() ?>
output.<?php phpinfo() ?>
中是否存在一些有关EXIF扩展名的信息?Is there in
<?php phpinfo() ?>
output some information about the EXIF extension?这篇关于PHP:exif_read_data()未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!