PHP » GoLang |
login |
register |
about
|
finfo_openfinfo::__construct(PHP >= 5.3.0, PECL fileinfo >= 0.1.0) finfo_open -- finfo::__construct — Create a new fileinfo resource DescriptionProcedural style
resource finfo_open
([ int
$options = FILEINFO_NONE
[, string $magic_file = NULL
]] )Object oriented style (constructor): This function opens a magic database and returns its resource. Parameters
Return Values
(Procedural style only)
Returns a magic database resource on success or NotesWarning
The expected magic database format changed in PHP 5.3.11 and 5.4.1. Due to this, the internal magic database was upgraded. This mostly effects code where an external magic database is used: reading an older magic file will now fail. Also, some textual representations of the mime types has changed, for instance for PHP would be "PHP script, ASCII text" instead of "PHP script text" returned.
ExamplesExample #1 Object oriented style
<?php Example #2 Procedural style
<?php The above example will output: text/plain; charset=us-ascii |
more
Recently updated
more
Most requested
more
Last requests
|