note 42647 deleted from function.proc-open by cmb

From: Date: Mon, 31 Aug 2015 18:45:55 +0000
Subject: note 42647 deleted from function.proc-open by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203534@lists.php.net to get a copy of this message
Note Submitter: Andre Caldas ---- 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.

« previous php.notes (#203534) next »