(PHP 4 >= 4.3.0, PHP 5, PHP 7)
exif_imagetype — �ж�һ��ͼ�������
$filename
) : intexif_imagetype() ��ȡһ��ͼ��ĵ�һ���ֽڲ������ǩ����
����������������������� exif �����õ��˲�֧�ֵ��ļ������ϻ�� $_SERVER['HTTP_ACCEPT'] ���ʹ�������������Ƿ������ʾij��ָ����ͼ��
filename
���������ǡ����ǩ����һ����Ӧ�ij���������
FALSE
������ֵ�� getimagesize()
���ص������е����� 2 ��ֵ��һ���ģ�����������öࡣ
�汾 | ˵�� |
---|---|
4.3.2 | ֧�� JPC��JP2��JPX��JB2��XBM �Լ� WBMP |
4.3.0 | ֧�� SWC |
���������³������������� exif_imagetype() ���ܵķ���ֵ��
ֵ | ���� |
---|---|
1 | IMAGETYPE_GIF |
2 | IMAGETYPE_JPEG |
3 | IMAGETYPE_PNG |
4 | IMAGETYPE_SWF |
5 | IMAGETYPE_PSD |
6 | IMAGETYPE_BMP |
7 | IMAGETYPE_TIFF_II ��Intel �ֽ�˳�� |
8 |
IMAGETYPE_TIFF_MM ��Motorola �ֽ�˳��
|
9 | IMAGETYPE_JPC |
10 | IMAGETYPE_JP2 |
11 | IMAGETYPE_JPX |
12 | IMAGETYPE_JB2 |
13 | IMAGETYPE_SWC |
14 | IMAGETYPE_IFF |
15 | IMAGETYPE_WBMP |
16 | IMAGETYPE_XBM |
Example #1 exif_imagetype() ����
<?php
if (exif_imagetype("image.gif") != IMAGETYPE_GIF) {
echo "The picture is not a gif";
}
?>