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

ParameterIs RequiredDescription
fileRequired.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);
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions