On Jan 22, 2008 4:24 AM, bob <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I am having trouble getting the PHP PECL fileinfo component to work. I
> am using Cakephp 1.2, XAMPP in WIndows Vista environment.
>
> I have the following code:
> $file = "C:\xampp\htdocs\app\webroot\pics\file.jpg";
>
> $handle = finfo_open(FILEINFO_COMPRESS,'c:/magic');//
> FILEINFO_COMPRESS,"c:/magic");
I'm not a Windows user but shouldn't that be 'C:\magic'? Aside from
the slash direction, is the 'C' part case-sensitive?
> if (!$handle) {
> echo "Opening fileinfo database failed";
> }
>
You should probably have an exit or return here, no? Are you sure this
echo isn't happening and is hidden in your HEAD somewhere? As it is,
there's nothing stopping the script from moving on to finfo_file()
regardless of what $handle happens to be.
b
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---