php fflush 函数
php fflush 函数
fflush
( PHP 4中> = 4.0.1 , PHP 5中)
fflush -刷新输出到一个文件
描述
布尔fflush (资源$处理)
此功能部队写入所有缓冲输出的资源所指向的文件句柄。
参数
把柄
文件指针必须有效,必须指向一个文件成功打开fopen()或者fsockopen() (和尚未关闭fclose() ) 。
返回值
返回TRUE或FALSE的成功失败。
实例
例如1号文件的写例如使用fflush()、
<?php $filename = 'bar.txt'; $file = fopen($filename, 'r+'); rewind($file); fwrite($file, 'Foo'); fflush($file); ftruncate($file, ftell($file)); fclose($file); ?>
文章网址:http://www.phprm.com/function/029098bfa7d6b212ff246d971572fbce.html
随意转载^^但请附上教程地址。