Heim  >  Artikel  >  Backend-Entwicklung  >  php fflush 函数_PHP教程

php fflush 函数_PHP教程

WBOY
WBOYOriginal
2016-07-20 11:01:021076Durchsuche

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


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/445480.htmlTechArticlephp fflush 函数 fflush ( PHP 4中 = 4.0.1 , PHP 5中) fflush -刷新输出到一个文件 描述 布尔fflush (资源$处理) 此功能部队写入所有缓冲输出的资...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn