I tried to get the output from the proc_open
method in php, but when I printed it, I got empty.
$ descriptorspec = array (
0 => array ("pipe", "r"),
1 => array ("pipe", "w"),
2 => array ("file", "files / temp / error-output.txt", "a")
);
$ process = proc_open ("time ./a a.out", $ descriptorspec, $ pipes, $ cwd);
As long as I know, I can get output with stream_get_contents()
echo stream_get_contents ($ pipes [1]);
fclose ($ pipes [1]);
But I canβt do it. any suggestion?
thanks before ...
Bobby stenly
source share