PHP fflush()Functions


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual

Definition and Usage

The fflush() function writes all buffered output to an open file.

Returns TRUE on success, or FALSE on failure.

Syntax

fflush(file)

Parameters Description
file Required. Specifies the open file stream to be checked.


Example

<?php
$file = fopen("test.txt","r+");
// some code
fflush($file);
?>


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual Other Extensions