显示下拉菜单

exif_imagetype()

« escapeshellcmd | exif_read_data »
<?php
$int 
exif_imagetype (
    
  // string $filename
);

// displays the constant name
$name pbx_get_constant_name($int"IMAGETYPE"true);
?>
结果
$int = false
$name = 'IMAGETYPE_UNKNOWN'
PHP warning : exif_imagetype(https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Political_World_Map_in_Official_Language.jpg/320px-Political_World_Map_in_Official_Language.jpg): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden. Please comply with the User-Agent policy: https://meta.wikimedia.org/wiki/User-Agent_policy
示例
#1 exif_imagetype  ("https://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Political_World_Map_in_Official_Language.jpg/320px-Political_World_Map_in_Official_Language.jpg")
另请参阅
getimagesize, image_type_to_mime_type, pbx_get_constant_name