PHP Doku:: Laufzeit-Konfiguration - fileinfo.configuration.html

Verlauf / Chronik / History: (5) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDateisystemrelevante ErweiterungenFile InformationInstallation/KonfigurationLaufzeit-Konfiguration

Ein Service von Reinhard Neidl - Webprogrammierung.

Installation/Konfiguration

<<Installation

Ressource-Typen>>

Laufzeit-Konfiguration

Diese Erweiterung definiert keine Konfigurationseinstellungen in der php.ini.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
sam nospam at archives.org.au
24.03.2010 7:03
In addition to
 extension=fileinfo.so
I also had to add
 mime_magic.magicfile=/usr/share/file/magic
to my php configuration.  Then, I instantiate Finfo thus:

<?php
$mimeMagicFile
= get_cfg_var('mime_magic.magicfile');
$finfo = new finfo(FILEINFO_MIME, $mimeMagicFile);
?>

(This is despite the rumours I hear about the default being exactly what I set it to anyway.)
wade at waddles dot org
12.08.2008 17:18
On Ubuntu Feisty, you need to add the line

extension=fileinfo.so

to your /etc/php5/*/php.ini files. The extension gets linked at compile time to /usr/lib/libmagic.so.1 which uses a MAGIC environment variable which defaults to

/etc/magic:/usr/share/file/magic



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)