(PHP 4 >= 4.0.1, PHP 5, PHP 7)
fflush — 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷募锟�
$handle
) : bool
锟斤拷锟斤拷锟斤拷强锟狡斤拷锟斤拷锟叫伙拷锟斤拷锟斤拷锟斤拷写锟斤拷
handle
锟侥硷拷锟斤拷锟斤拷锟街革拷锟斤拷锟斤拷源锟斤拷
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
锟侥硷拷指锟斤拷锟斤拷锟斤拷锟斤拷锟叫э拷模锟斤拷锟斤拷锟街革拷锟斤拷锟� fopen() 锟斤拷 fsockopen() 锟缴癸拷锟津开碉拷锟侥硷拷(锟斤拷锟斤拷未锟斤拷 fclose() 锟截憋拷)锟斤拷
handle
锟侥硷拷指锟斤拷锟斤拷锟斤拷锟斤拷锟叫э拷模锟斤拷锟斤拷锟街革拷锟斤拷锟� fopen() 锟斤拷 fsockopen() 锟缴癸拷锟津开碉拷锟侥硷拷(锟斤拷锟斤拷未锟斤拷 fclose() 锟截憋拷)锟斤拷
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
Example #1 File write example using fflush()
<?php
$filename = 'bar.txt';
$file = fopen($filename, 'r+');
rewind($file);
fwrite($file, 'Foo');
fflush($file);
ftruncate($file, ftell($file));
fclose($file);
?>