Output_buffering, how to solve

Source: Internet
Author: User
Output_buffering
Look at the buffer, there are many questions.
Comments from senior Members
I opened php.ini to see

; Output_buffering
; Default Value:off
; Development value:4096
; Production value:4096

Output_buffering, this one's commented out.
As I understand it, there's no buffer to start PHP.

But I wrote it in the program.

echo "123123";
Ob_end_clean ();

There's no output to the page.
Which means that Echo was written to the buffer first.
And then he was killed by Ob_end_clean.


My problem is, if it's commented out,
is the buffer open or closed??? Is it related to the environment?


------Solution--------------------
Output_buffering = 4096

Are you sure you have a comment???
This option is turned on by default in php.ini unless you manually modify it.
I'm going to post this comment off.

Echo 123;
Ob_end_clean ();

Will output 123 immediately and prompt Notice:ob_end_clean (): Failed to delete buffer. No buffer to delete in/users/angryfrog/website/test.php on line 3.

No buffer can be removed, that is, no buffering is turned on at all.
Not output 123 unless Ob_start () is added to the head.

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