PHP: Fileinfo Functions - Manual in Deutsh
PHP: Fileinfo Functions - Manual in French
PHP: Fileinfo Functions - Manual in Polish

You Are At PHP: Fileinfo Functions - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

XXXVIII. Fileinfo Functions

Introduction

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.

Requirements

magic_open library is needed to build this extension.

Installation

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: http://pecl.php.netfileinfo

Runtime Configuration

This extension has no configuration directives defined in php.ini.

Resource Types

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

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

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
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

końcówki kolekcji, centrum leczenia uzależnień, gazetki markt, Optymalizacja strony, długi, Toshiba G710, studium dietetyka warszawa, materace, tanie schody
camembert zakłady sportowe hotel akropol aranżacja sypialni kredyt lukas

Another Useful functions:


ref.fileinfo | function.pharfileinfo-setuncompressed | function.pharfileinfo-setmetadata | function.pharfileinfo-setcompressedgz | function.pharfileinfo-setcompressedbzip2 | function.pharfileinfo-iscrcchecked | function.pharfileinfo-iscompressedgz | function.pharfileinfo-iscompressedbzip2 | function.pharfileinfo-iscompressed | function.pharfileinfo-getpharflags | function.pharfileinfo-getmetadata | function.pharfileinfo-getcrc32 | function.pharfileinfo-getcompressedsize | function.pharfileinfo-construct | function.pharfileinfo-chmod | function.fileinode |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.