PHP: exif_read_data () not defined

Now I am learning how to extract exif from images.I wrote simple code as follows:

<?php
//Get the exif data
$exif_data = exif_read_data('sample.jpg');
print_r($exif_data);
?>

But when executing the code, a fatal error occurs regarding undefined exif_read_data (). I am a Windows user and I changed php.ini as follows:

extension=php_mbstring.dll
extension=php_exif.dll

Thank you for your help.

+5
source share
3 answers
  • Do you have these DLLs on your system in a folder Php/ext?

  • Did you restart Apache after editing php.ini?

  • Have you edited the php.inione used by the system? You can check this indication <?php phpinfo() ?>.

  • Is there any <?php phpinfo() ?>information about the EXIF ​​extension in the output?

+8
source

exif.so php_exif.dll php.ini, - , , php.ini.

PHP . exif mbstrings. , exif mbstrings . mbstrings exif.

, exif , .

http://php.net/manual/en/book.exif.php

+2

if (extension_loaded ("exif")) $ exif = exif_read_data (, 'EXIF', true); $ exif = false;

0
source

All Articles