php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54613 finfo_open exemple in finfo_file
Submitted: 2011-04-27 17:19 UTC Modified: 2011-04-30 14:24 UTC
From: ranger dot 2130 at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.2.6-1+lenny10 OS: Debian 2.6.33.5-xxxx-grs-ipv4-64
Private report: No CVE-ID: None
 [2011-04-27 17:19 UTC] ranger dot 2130 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.finfo-file#Exemples
---
$finfo = finfo_open(FILEINFO_MIME_TYPE); // Retourne le type mime à la extension 
mimetype

or here http://www.php.net/function.finfo-open : $finfo = 
finfo_open(FILEINFO_MIME, "/usr/share/misc/magic"); // Retourne le type mime

So arg #2 is missing in finfo-file man page


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-30 14:05 UTC] salathe@php.net
-Status: Open +Status: Bogus
 [2011-04-30 14:05 UTC] salathe@php.net
The second argument to finfo_open() is optional, as described on 
http://php.net/function.finfo-open
 [2011-04-30 14:24 UTC] ranger dot 2130 at gmail dot com
-Operating System: +Operating System: Debian 2.6.33.5-xxxx-grs-ipv4-64 -PHP Version: Irrelevant +PHP Version: 5.2.6-1+lenny10
 [2011-04-30 14:24 UTC] ranger dot 2130 at gmail dot com
Sorry I just tested and I got a warning because FILEINFO_MIME_TYPE is interpreted 
as a string meanwhile FILEINFO_MIME is not.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 05:00:01 2026 UTC