php fflush function
ffflush
(PHP 4" = 4.0.1, PHP 5)
fflush - Flushes output to a file
Description
boolean fflush (resource$process)
This function forces writing of all buffered output to the file handle pointed to by the resource.
Parameters
Handle
The file pointer must be valid and must point to a file successfully opened by fopen() or fsockopen() (and not yet closed by fclose()).
Return value
Returns TRUE or FALSE on success or failure.
Example
For example, to write file No. 1, use fflush ( ),
$filename = 'bar.txt';
$file = fopen($filename, 'r+');
rewind($file);
fwrite($file, 'Foo');
fflush($file);
ftruncate($file, ftell($file));
fclose($file);
?>