RE: [PHP] preventing output dump of passthru()
| From: | Chris W. Parker | Date: | Wed, 06 Aug 2003 00:10:25 +0000 |
| Subject: | RE: [PHP] preventing output dump of passthru() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158374@lists.php.net to get a copy of this message | ||
Chris W. Parker <>
on Tuesday, August 05, 2003 4:56 PM said:
> Trying to prevent the output dumping of passthru() and instead store
> the output in a variable.
[snip]
> But that didn't work. Is there *ANY* way to achieve what I want?
Ok I've found one solution so far* and it's doing what I want. But I'm
not sure exactly what it's doing so I'd like to know if it's "dangerous"
or not.
Here is my code:
$command = "file -i ".$pictureDir."1"."_".$id."-*.gif"; //
testing
$output =
$command;
$outputArr = explode("\n",$command_output);
print_r($outputArr);
If you'll notice line #2 is "$output = $command;". It has those funny
quote characters, the button next to the 1.
What is that and why does it work??
Thanks,
Chris.