PHP fflush() Function
Definition
The fflush() function writes all buffered output to an open file.
Syntax
PHP fflush() Function has the following syntax.
fflush(file)
Parameter
Parameter | Is Required | Description |
---|---|---|
file | Required. | Open file stream to check |
Return
PHP fflush() Function returns TRUE on success and FALSE on failure.
Example
Writes all buffered output to an open file
<?php//from w w w . j a v a 2s. c o m
$file = fopen("test.txt","r+");
// some code
fflush($file);
?>