(PHP >= 5.3.0, PECL fileinfo >= 0.1.0)
finfo_file -- finfo::file — ����һ���ļ�����Ϣ
���̻����
$finfo
, string $file_name = NULL
[, int $options = FILEINFO_NONE
[, resource $context = NULL
]] ) : string���������
$file_name = NULL
[, int $options = FILEINFO_NONE
[, resource $context = NULL
]] ) : string������������ȡһ���ļ�����Ϣ��
finfofinfo_open() ���������ص� fileinfo ��Դ��
file_nameҪ�����ļ�����
optionsһ�� Fileinfo ���� ���� Fileinfo ���� �����������㡣
context���� contexts �ĸ�����������ο� Stream ������
���� file_name ����ָ�����ļ���Ϣ��
��������ʱ���� FALSE ��
Example #1 finfo_file() ����
<?php
$finfo = finfo_open(FILEINFO_MIME_TYPE); // ���� mime ����
foreach (glob("*") as $filename) {
echo finfo_file($finfo, $filename) . "\n";
}
finfo_close($finfo);
?>
�������̵���������ڣ�
text/html image/gif application/vnd.ms-excel