The installation of exif does not require additional libraries, so the installation steps are omitted.
For example, php installation directory:/root/lnmp0.4-full/php-5.2.10/
Run: cd/root/lnmp0.4-full/php-5.2.10/ext/
We want to install the exif module and execute cd exif/
Then run/usr/local/php/bin/phpize to return the following information:
Processing ING:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Run the following command:
[Root @ vpser imap] #./configure-with-php-config =/usr/local/php/bin/php-config
[Root @ vpser imap] # make & make install
Return after execution:
Build complete.
Don't forget to run 'Make test '.
Installing shared extensions: �0 �2 �0 �0 �0 �2 �0 �2/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
Indicates that the operation is successful. Modify/usr/local/php/etc/php. ini.
Search: extension = Add extension = "exif. so" to the end of the last extension ="
Save and run/etc/init. d/php-fpm restart to restart.
Create an exif. php file under/home/wwwroot/with the following content:
<? Php
$ Exif = read_exif_data ('IMG _ 0001. JPG ');
While (list ($ k, $ v) = each ($ exif )){
Echo "$ k: $ v
N ";
}
?>
Here, IMG_0001.JPG is a photo file.