PHP uses the Exif_read_data function to obtain the EXIF information of the image,
PHP gets the EXIF information of the picture, PHP comes with a exif_read_data function that can be used to read the EXIF information of the picture, the code from the PHP manual
<?phpecho "Test1.jpg:
\ n "; $exif = Exif_read_data (' tests/test1.jpg ', ' IFD0 '); Echo $exif ===false? "No header data found.
\ n ":" Image contains headers
\ n "; $exif = Exif_read_data (' tests/test2.jpg ', 0, true); echo "Test2.jpg:
\ n "; foreach ($exif as $key = + $section) { foreach ($section as $name + $val) { echo" $key. $name: $val
\ n "; }}? >
The output is as follows
Test1.jpg:No Header Data Found.test2.jpg:FILE. Filename:test2.jpgfile.filedatetime:1017666176file. Filesize:1240file. Filetype:2file. Sectionsfound:any_tag, IFD0, THUMBNAIL, commentcomputed.html:width= "1" height= "1" COMPUTED. Height:1computed. Width:1computed. Iscolor:1computed. Byteordermotorola:1computed. Usercomment:exif Test Image.COMPUTED.UserCommentEncoding:ASCIICOMPUTED. Copyright:photo (c) M.boerger, edited by M.boerger.computed.copyright.photographer:photo (c) m. BoergerCOMPUTED.Copyright.Editor:Edited by M.boerger.ifd0.copyright:photo (c) m.boergerifd0.usercomment: Asciithumbnail. Jpeginterchangeformat:134thumbnail. Jpeginterchangeformatlength:523comment.0:comment #1. Comment.1:comment #2. Comment.2:comment # 3endthumbnail.jpeginterchangeformat:134thumbnail. Thumbnail.height:1thumbnail. Thumbnail.height:1
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/1003997.html www.bkjia.com true http://www.bkjia.com/PHPjc/1003997.html techarticle PHP through the Exif_read_data function to obtain the EXIF information of the picture, PHP gets the EXIF information of the picture, PHP comes with a exif_read_data function can be used to read the image of EXIF information, code from the PHP hand ...