#19711 [Opn]: fflush doesn't flushes to a file

From: Date: Wed, 02 Oct 2002 12:07:46 +0000
Subject: #19711 [Opn]: fflush doesn't flushes to a file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21255@lists.php.net to get a copy of this message
ID: 19711 User updated by: thomasdkeller@web.de Reported By: thomasdkeller@web.de Status: Open Bug Type: Output Control Operating System: Windows 2000 Server PHP Version: 4.2.2 New Comment: Also tested this under IIS and Win2k Server, same problem. Previous Comments: ------------------------------------------------------------------------ [2002-10-02 06:44:21] thomasdkeller@web.de Hi there! It _may_ be a bug, but i'm not sure, if I have anything forgot to write down, nevertheless the following code --- <?php for($i=0;$i<1000;$i++) { echo "foo "; } $fp = fopen("tmp.txt","w+"); fflush($fp); fclose($fp); ?> --- does _not_ work like my intention was (create new file called tmp.txt, flush output (1000 times "foo ") into it and close the file). Instead of this it takes longer than normal to execute the script, then it flushes the output to the browser, creates a new file and leaves it empty (obviously fflush returns "1" for successful). I've searched the internet, didn't found anything. Also your documentation has no example for this function (if I coded it wrong). My system: Apache 1.3.26. PHP (with standard Out-Of-The-Box modules) as module, all read/ write access Thanks in advance, Thomas Keller. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19711&edit=1

« previous php.bugs (#21255) next »