Home > php教程 > php手册 > body text

php fflush 函数

WBOY
Release: 2016-06-13 11:17:16
Original
1364 people have browsed it

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);
?>


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!