mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
amend proc_open example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78064 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a59df78205
commit
3787ef5bb9
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.28 $ -->
|
||||
<!-- $Revision: 1.29 $ -->
|
||||
<reference id="ref.exec">
|
||||
<title>Program Execution functions</title>
|
||||
<titleabbrev>Program Execution</titleabbrev>
|
||||
|
@ -282,11 +282,14 @@ if (is_resource($process)) {
|
|||
// Any error output will be appended to /tmp/error-output.txt
|
||||
|
||||
fwrite($pipes[0], "<?php echo \"Hello World!\"; ?>");
|
||||
fclose($pipes[0]);
|
||||
|
||||
while(!feof($pipes[1])) {
|
||||
echo fgets($pipes[1], 1024);
|
||||
}
|
||||
|
||||
fclose($pipes[1]);
|
||||
// It is important that you close any pipes before calling
|
||||
// proc_close in order to avoid a deadlock
|
||||
$return_value = proc_close($process);
|
||||
|
||||
echo "command returned $return_value\n";
|
||||
|
|
Loading…
Reference in a new issue