note 80583 added to function.finfo-open
| From: | php at kingsquare dot nl | Date: | Wed, 23 Jan 2008 15:41:40 +0000 |
| Subject: | note 80583 added to function.finfo-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135337@lists.php.net to get a copy of this message | ||
The current version (1.04) doesnt support a different mime.magic database than the server default.
(the documentation is thus not correct)
Ubuntu default location is '/usr/share/file/magic'. In order for the examples to work all
finfo_open()-commands must be issued with the extra location accordingly:
<?php
$file = "/path/to/file.jpg";
$handle = finfo_open(FILEINFO_MIME, '/usr/share/file/magic');
$mime_type = finfo_file($handle,$file);
?>
----
Server IP: 213.249.64.162
Probable Submitter: 84.245.25.201
----
Manual Page -- http://www.php.net/manual/en/function.finfo-open.php
Edit -- https://master.php.net/note/edit/80583
Del: integrated -- https://master.php.net/note/delete/80583/integrated
Del: useless -- https://master.php.net/note/delete/80583/useless
Del: bad code -- https://master.php.net/note/delete/80583/bad+code
Del: spam -- https://master.php.net/note/delete/80583/spam
Del: non-english -- https://master.php.net/note/delete/80583/non-english
Del: in docs -- https://master.php.net/note/delete/80583/in+docs
Del: other reasons-- https://master.php.net/note/delete/80583
Reject -- https://master.php.net/note/reject/80583
Search -- https://master.php.net/manage/user-notes.php