note 42647 added to function.proc-open
| From: | AndreCaldas at rn2 dot php dot net | Date: | Tue, 25 May 2004 07:13:42 +0000 |
| Subject: | note 42647 added to function.proc-open | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70052@lists.php.net to get a copy of this message | ||
About the comment by ch at westend dot com
of 28-Aug-2003 08:46
File streams are buffers. The data is not actualy written if you do not flush the buffer. In your
case, fclose has the side effect of flushing the buffer you are closing.
The program "hangs" because it tries to read some data that was not written (since it is
buffered).
You must do something like:
<?php
fwrite($fp);
fflush($fp);
fread($fp);
?>
Good luck,
Andre Caldas.
----
Manual Page -- http://www.php.net/manual/en/function.proc-open.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42647
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42647&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42647&report=yes
Search -- http://master.php.net/manage/user-notes.php