proc_openExecute a command and open file pointers for input/output Description
resource proc_open
( string
$cmd
, array $descriptorspec
, array &$pipes
[, string $cwd
[, array $env
[, array $other_options
]]] )proc_open is similar to popen but provides a much greater degree of control over the program execution. Parameters
Return Values
Returns a resource representing the process, which should be freed using
proc_close when you are finished with it. On failure
returns Changelog
Examples
Example #1 A proc_open example
<?phpThe above example will output something similar to:
Array
(
[some_option] => aeiou
[PWD] => /tmp
[SHLVL] => 1
[_] => /usr/local/bin/php
)
command returned 0
Notes
|