Problems with pear
| From: | David Altman | Date: | Mon, 14 Jun 2010 12:48:53 +0000 |
| Subject: | Problems with pear | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-30616@lists.php.net to get a copy of this message | ||
I recently was told I could use your MIME_Type-1.2.0 to *properly *detect a
file's mime type. I downloaded that and the pear file, and copied them both
into my scripts directory. I copied the sample line from your site (
http://pear.php.net/manual/en/package.tools.mime-type.detecting.php)
as
follows:
require_once 'MIME/Type.php';
$filename = '/path/to/some/file.jpg';
echo MIME_Type::autoDetect($filename);
and changed it to:
require_once 'MIME_Type-1.2';
$filename = '/path/to/some/file.jpg';
echo MIME_Type::autoDetect($filename);
However, I get the following:
*Warning*: require_once(MIME_Type-1.2)
[function.require-once<http://www.therefugechurch.info/Scripts/function.require-once>]:
failed to open stream: No such file or directory...
*Fatal error*: require_once()
[function.require<http://www.therefugechurch.info/Scripts/function.require>]:
Failed opening required 'MIME_Type-1.2' (include_path='.;C:\php5\pear')...
1). Both the file MIME_Type-1.2 and PEAR-1.9.1 have no file extensions.
The "Type.php" doesn't exist, unless it's MIME_Type-1.2.
2). I have no access to my php5.ini file.
Am I missing something obvious? All I want is the darned MIME type... this
shouldn't be so hard... Can anyone help?