It works now using shell_exec(), so no buffering necessary.
$type = shell_exec('/usr/bin/file -i -b ' .
escapeshellarg(realpath($filepath)));
On Sun, Feb 15, 2009 at 12:55 PM, brian <[email protected]> wrote:
> I might see if shell_exec() works, actually.
>
> On Sun, Feb 15, 2009 at 4:04 AM, mscdex <[email protected]> wrote:
>>
>> On Feb 15, 12:41 am, brian <[email protected]> wrote:
>>> ob_start();
>>> system('/usr/bin/file -i -b ' . realpath($filepath));
>>> //$type = ob_get_clean();
>>> $type = ob_get_flush();
>>
>> Have you tried using exec() and passing in a variable for the "output"
>> parameter, instead of using system()? Or if you're expecting only one
>> line of output from the command, you can probably omit the "output"
>> parameter since exec() returns the last line of output as the return
>> value.
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---