Current Location: Home> Function Categories> fflush

fflush

Export buffered content to file
Name:fflush
Category:File system
Programming Language:php
One-line Description:Output buffered content to the open file.

Definition and usage

fflush() function outputs the buffered content to a file.

Example

 <?php
file = fopen ( "test.txt" , "r+" ) ;

// Some code

ffflush ( $file ) ;
?>

grammar

 fflush ( file )
parameter describe
file Required. Specify the file flow to be checked.

illustrate

This function forces all buffered output to be written to the resource pointed to by the file handle. Return true if successful, otherwise return false.

The file pointer must be valid and must point to a file that was successfully opened by fopen() or fsockopen() (but has not been closed fclose() ).

Similar Functions
Popular Articles