XXXIX. Fileinfo Functions

Въведение

The functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job.

Изисквания

magic_open library is needed to build this extension.

Инсталация

Информация относно инсталирането на това PECL разширение може да се намери в главата от ръководството Инсталиране на PECL разширения. Допълнителна информация, като нови издания, изтегляния, изходни файлове, информация за поддръжката и CHANGELOG може да се намери тук: http://pecl.php.net/package/fileinfo

Конфигурация по време на работа

Това разширение няма дефинирани конфигурационни директиви в php.ini.

Ресурсни типове

There is one resource used in Fileinfo extension: a magic database descriptor returned by finfo_open().

Предефинирани константи

Константите по-долу са дефинирани в това разширение и ще бъдат налични единствено, когато това разширение е компилирано в PHP или динамично пуснато по време на изпълнение.

FILEINFO_NONE (integer)

No special handling.

FILEINFO_SYMLINK (integer)

Follow symlinks.

FILEINFO_MIME (integer)

Return a mime string, instead of a textual description.

FILEINFO_COMPRESS (integer)

Decompress compressed files.

FILEINFO_DEVICES (integer)

Look at the contents of blocks or character special devices.

FILEINFO_CONTINUE (integer)

Return all matches, not just the first.

FILEINFO_PRESERVE_ATIME (integer)

If possible preserve the original access time.

FILEINFO_RAW (integer)

Don't translate unprintable characters to a \ooo octal representation.

Съдържание
finfo_buffer -- Return information about a string buffer
finfo_close -- Close fileinfo resource
finfo_file -- Return information about a file
finfo_open -- Create a new fileinfo resource
finfo_set_flags -- Set libmagic configuration options