finfo->__construct()
finfo->__construct - Create a new fileinfo resource
Syntax
resource finfo->__construct (
int $options,
string $magic_file,
int $options,
string $magic_file)
Arguments
- options - One or disjunction of more Fileinfo constants.
- magic_file - Name of a magic database file, usually something like /path/to/magic.mime. If not specified, the MAGICenvironment variable is used. If this variable is not set either, /usr/share/misc/magicis used by default. A.mimeand/or.mgcsuffix is added if needed.
- options
- magic_file
Description
Procedural style
Version
PHP >= 5.3.0, PECL fileinfo >= 0.1.0
Return value
Returns a magic database resource on success or FALSE on failure.