(PHP 4 >= 4.0.1, PHP 5)
fflush — Flushes the output to a file
This function forces a write of all buffered output to the resource pointed to by the file handle .
성공할 경우 TRUE를, 실패할 경우 FALSE를 반환합니다.
Example #1 File write example using fflush()
<?php
$filename = 'bar.txt';
$file = fopen($filename, 'r+');
rewind($file);
fwrite($file, 'Foo');
fflush($file);
ftruncate($file, ftell($file));
fclose($file);
?>