php fflush 函数
fflush
( PHP 4中“ = 4.0.1 , PHP 5中)
fflush -刷新输出到一个文件
描述
布尔fflush (资源$处理)
此功能部队写入所有缓冲输出的资源所指向的文件句柄。
参数
把柄
文件指针必须有效,必须指向一个文件成功打开fopen ( )或者fsockopen ( ) (和尚未关闭fclose ( ) ) 。
返回值
返回TRUE或FALSE的成功失败。
实例
例如1号文件的写例如使用fflush ( )、
$filename = 'bar.txt';
$file = fopen($filename, 'r+');
rewind($file);
fwrite($file, 'Foo');
fflush($file);
ftruncate($file, ftell($file));
fclose($file);
?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 //m.sbmmt.com/ All Rights Reserved | php.cn | 湘ICP备2023035733号