Some doubts about output_buffering

Source: Internet
Author: User
I have some questions about output_buffering on the Internet.
I saw this file on the Internet.
Http://www.cnblogs.com/zemliu/archive/2012/05/11/2495293.html

As mentioned above
PHP output sequence

1. open the php output cache: echo, print-> php output_buffring-> server buffering-> browser display

2. php output cache not enabled: echo, print-> server buffering-> browser display

Is this true ?????


And
Ob_flush () function: extracts data from PHP buffering and places the data in server buffering.
Flush () function: extract the data of Server buffering and put it into browser buffering.

So when we want to force the buffer zone output, write ob_flush () first and write flush ()
Is that true?
------ Solution --------------------
Yes.

However, for ob_flush () and flush (), it depends on the control requirements.
Echo 'A ';
Ob_flush ();
Flush ();
Sleep (1 );
And
Echo 'A ';
Flush ();
Ob_flush ();
Sleep (1 );
The difference is that the former will immediately see a, while the latter will wait a second to see

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.