PHP fflush function _php Tutorial

Source: Internet
Author: User
PHP fflush functions

Fflush
(php 4 "= 4.0.1, PHP 5)

Fflush-Flush output to a file

Describe
Boolean fflush (resource $ processing)
This feature forces the file handle that is pointed to by the resource to which all buffered outputs are written.

Parameters

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


return value
Returns TRUE or FALSE for successful failure.

Instance

For example, the writing of a 1th file such as 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.html www.bkjia.com true http://www.bkjia.com/PHPjc/445480.html techarticle php fflush function fflush (php 4 = 4.0.1, PHP 5) fflush-Flush output to a file description Boolean Fflush (resource $ processing) This feature forces write all buffered output to the capital ...

  • 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.