Forum und email

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.

Εγκατάσταση

Information for installing this PECL extension may be found in the manual chapter titled Installation of PECL extensions. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: » https://pecl.php.net/package/fileinfo

Ρυθμίσεις κατά την εκτέλεση

Αυτή η επέκταση δεν έχει directives ρύθμισης ορισμένα στο php.ini.

Τύποι Πόρων

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

Προκαθορισμένες Σταθερές

Οι σταθερές παρακάτω ορίζονται από αυτή την επέκταση, και θα είναι διαθέσιμες μόνο αν η επέκταση έχει γίνει compile μέσα στην 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.

Table of Contents