exif_imagetype

exif_imagetype

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

exif_imagetypeDetermine the type of an image

Description

int exif_imagetype ( string $filename )

exif_imagetype() reads the first bytes of an image and checks its signature.

exif_imagetype() can be used to avoid calls to other exif functions with unsupported file types or in conjunction with 登录查看完整内容