fflush()函数将所有缓冲的输出写入打开的文件,如果成功,则返回true,否则返回false。
语法
bool fflush ( resource $handle )
该函数强制将所有缓冲的输出写入文件句柄指向的资源。
在线示例
<?php
$file = fopen("/PhpProject/sample.txt", "r+");
// some code
fflush($file);
echo $file;
fclose($file);
?>
输出结果
Resource id #5
展开全部