I need to run a linux command via php and display the output in a browser.
<?
passthru('/home/user/qmHandle -R > output');
header("location:./output");
?>
The above code is supposed to run qmHandle and write the output to a file "output".
It works fine, but it only writes the last line to "output".
However, when I run qmHandle directly at a terminal, it outputs several hundred lines to screen.
How can I capture all of the output, instead of just the last line?
Thx.