Hi,
I'm using PHP 5. Assuming there are no errors, how do I get the
output of an exec call? I'm trying
$cmd = 'strings < ' . escapeshellarg($file) . ' | sed -
n \'s|.*/Count -\{0,1\}\([0-9]\{1,\}\).*|\1|p\' | sort -rn | head -n
1';
exec("$cmd 2>&1", $output, $return);
if ($return != 0) {
$output = join("<BR>\n", $output) . "<BR>\n";
return -1;
} // if
$count = intval(join("", $output));
return $count;
But the $output array is empty. I have printed out the $cmd var and
verified that I can run it on my shell.
Thanks for any feedback, - Dave