Write all buffered output to the open file.
| <?php $file = fopen(“test.txt”,“r+”); rewind($file); fwrite($file, ‘Hello World’); fflush($file); fclose($file); ?> |
The fflush() function writes all buffered data to an open file.
| fflush(file) |
|
Parameter |
Description |
|
file |
Mandatory. Specifies the open file to which the buffered output should be written. |
|
Return Value: |
Returns TRUE on success and FALSE on failure. |
|
PHP Version: |
4.0.1+ |