English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The fflush() function writes all buffered output to the opened file, and returns true if successful, otherwise false.
bool fflush ( resource $handle )
This function forces all buffered output to be written to the resource pointed to by the file handle.
<?php $file = fopen("/PhpProject/sample.txt", "r+"); // some code fflush($file); echo $file; fclose($file); ?>
Output result
Resource id #5