博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
lnmp安装exif扩展
阅读量:6202 次
发布时间:2019-06-21

本文共 3176 字,大约阅读时间需要 10 分钟。

lnmp安装exif扩展

1.找到位置

cd /usr/local/lnmp1.4-full/src

2.解压php

sudo bzip2 -d php-5.6.31.tar.bz2sudo tar -xvf php-5.6.31.tar

3.进入php

cd /usr/local/lnmp1.4-full/src/php-5.6.31/ext

4.进入exif

cd exif && /usr/local/php/bin/phpize

5.配置

./configure --with-php-config=/usr/local/php/bin/php-config

6.安装

sudo make && sudo make install

7.增加配置

cd /usr/local/php/conf.d
sudo vim 008-exif.ini
extension = "exif.so"

8.重启php

service php-fpm restart

9.查看

php -m
$ php -m |grep exifexif
array(45) {  ["FileName"]=>  string(9) "photo.jpg"  ["FileDateTime"]=>  int(1533333328)  ["FileSize"]=>  int(7941835)  ["FileType"]=>  int(2)  ["MimeType"]=>  string(10) "image/jpeg"  ["SectionsFound"]=>  string(30) "ANY_TAG, IFD0, THUMBNAIL, EXIF"  ["COMPUTED"]=>  array(8) {    ["html"]=>    string(26) "width="3479" height="4567""    ["Height"]=>    int(4567)    ["Width"]=>    int(3479)    ["IsColor"]=>    int(1)    ["ByteOrderMotorola"]=>    int(0)    ["ApertureFNumber"]=>    string(5) "f/2.8"    ["Thumbnail.FileType"]=>    int(2)    ["Thumbnail.MimeType"]=>    string(10) "image/jpeg"  }  ["Make"]=>  string(5) "Canon"  ["Model"]=>  string(12) "Canon EOS 6D"  ["XResolution"]=>  string(5) "300/1"  ["YResolution"]=>  string(5) "300/1"  ["ResolutionUnit"]=>  int(2)  ["Software"]=>  string(40) "Adobe Photoshop Camera Raw 8.5 (Windows)"  ["DateTime"]=>  string(19) "2018:08:04 11:18:27"  ["Exif_IFD_Pointer"]=>  int(208)  ["THUMBNAIL"]=>  array(6) {    ["Compression"]=>    int(6)    ["XResolution"]=>    string(4) "72/1"    ["YResolution"]=>    string(4) "72/1"    ["ResolutionUnit"]=>    int(2)    ["JPEGInterchangeFormat"]=>    int(844)    ["JPEGInterchangeFormatLength"]=>    int(13311)  }  ["ExposureTime"]=>  string(5) "1/125"  ["FNumber"]=>  string(5) "28/10"  ["ExposureProgram"]=>  int(1)  ["ISOSpeedRatings"]=>  int(160)  ["UndefinedTag:0x8830"]=>  int(2)  ["UndefinedTag:0x8832"]=>  int(160)  ["ExifVersion"]=>  string(4) "0230"  ["DateTimeOriginal"]=>  string(19) "2018:07:15 15:36:12"  ["DateTimeDigitized"]=>  string(19) "2018:07:15 15:36:12"  ["ShutterSpeedValue"]=>  string(15) "6965784/1000000"  ["ApertureValue"]=>  string(15) "2970854/1000000"  ["ExposureBiasValue"]=>  string(3) "0/1"  ["MaxApertureValue"]=>  string(3) "1/1"  ["MeteringMode"]=>  int(2)  ["Flash"]=>  int(16)  ["FocalLength"]=>  string(4) "50/1"  ["SubSecTimeOriginal"]=>  string(2) "11"  ["SubSecTimeDigitized"]=>  string(2) "11"  ["FocalPlaneXResolution"]=>  string(12) "5472000/1436"  ["FocalPlaneYResolution"]=>  string(11) "3648000/956"  ["FocalPlaneResolutionUnit"]=>  int(2)  ["CustomRendered"]=>  int(0)  ["ExposureMode"]=>  int(1)  ["WhiteBalance"]=>  int(1)  ["SceneCaptureType"]=>  int(0)  ["UndefinedTag:0xA431"]=>  string(12) "334021005410"  ["UndefinedTag:0xA432"]=>  array(4) {    [0]=>    string(4) "50/1"    [1]=>    string(4) "50/1"    [2]=>    string(3) "0/0"    [3]=>    string(3) "0/0"  }  ["UndefinedTag:0xA434"]=>  string(16) "EF50mm f/1.4 USM"  ["UndefinedTag:0xA435"]=>  string(10) "0000000000"}

以下几种方式都可以

$file_arr = read_exif_data('./photo.jpg');$file_arr = read_exif_data('https://cdn.caomall.net/15344950781428748118.jpg');$file_arr = read_exif_data($_FILES[$file_name]['tmp_name']);

转载地址:http://idqca.baihongyu.com/

你可能感兴趣的文章
iOS-FMDB
查看>>
redis简单学习3-redis常用命令总结
查看>>
hive 集成sentry
查看>>
mysql日志(介绍 路径修改 备份)
查看>>
git 配置图形比较工具
查看>>
SpringAPI手动创建代理对象——ProxyFactory
查看>>
iOS--数据存储NSUserDefaults
查看>>
Yii2.0 ActiveForm Input Fields
查看>>
navicat连接oracle 报 ORA-12737 set CHS16GBK
查看>>
linux下共享文件夹(windows可访问,linux也可访问)
查看>>
JavaScript-基础入门.0014.JavaScript内置对象
查看>>
Python+Flask.0010.FLASK即插视图之自定义视图类及修饰器
查看>>
javax.validation.ValidationException: Unable to find a default provider
查看>>
从网络获取数据显示到TableViewCell容易犯的错
查看>>
解析su,su -,sudo的区别
查看>>
C language day1
查看>>
php中获取系统信息的方法
查看>>
excel密码忘记了怎么办
查看>>
PureMvc学习笔记
查看>>
vxlan 资料及其在 neutron中的应用
查看>>