Phpfflush function _ PHP Tutorial

Source: Internet
Author: User
Phpfflush function. Phpfflush function fflush (4.0.1, PHP5 in PHP4) fflush-refresh the output to a file description Boolean fflush (resource $ processing) this function forces the php fflush function to write all buffer outputs

Fflush
("= 4.0.1, PHP 5" in PHP 4)

Fflush-refresh the output to a file

Description
Boolean fflush (resource $ processing)
This function is used to write the file handle pointed to by all buffered output resources.

Parameters

Handle
The file pointer must be valid and must point to a file that successfully opens fopen () or fsockopen () (and has not closed fclose ()).


Return value
Returns TRUE or FALSE.

Instance

For example, to write a file No. 1, for example, using fflush (),

$ Filename = 'bar.txt ';

$ File = fopen ($ filename, 'R + ');
Rewind ($ file );
Fwrite ($ file, 'Foo ');
Fflush ($ file );
Ftruncate ($ file, ftell ($ file ));
Fclose ($ file );
?>


Http://www.bkjia.com/PHPjc/445480.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445480.htmlTechArticlephp fflush function fflush (PHP 4 = 4.0.1, PHP 5) fflush-refresh output to a file description Boolean fflush (resource $ handle) this feature forces writing all buffer output resources...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.