RE: Output buffering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: djotto@xxxxxxxxx [mailto:djotto@xxxxxxxxx] On Behalf Of David Otton
Sent: 07 October 2009 10:54 AM
To: arno@xxxxxxxxxxxxxx
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Output buffering

2009/10/7 Arno Kuhl <akuhl@xxxxxxxxxxxx>:

> According to the manual I shouldn't see anything at all when 
> output_buffering is off (or if memory serves me correctly I should see 
> an error about "headers already sent" or something). Looking at 
> phpinfo confirms the value echoed by the script. Has something changed 
> with output buffering?

Use

    echo ob_get_level() . "<br/>";

to find out how many levels of output buffering you are wrapped in.

Whether output buffering is set to start automatically, and whether output
buffering is on right now are two different things:

    ob_end_clean();
    echo ob_get_level() . "<br/>";
    echo ini_get('output_buffering') . "<br/>";

--

Thanks David. After taking another look at the description for ob_start() I
began to suspect there was a difference, but the manual doesn't mention
anything about it. And the fact they use the same terminolgy for both the
settings and the functions is confusing. I can see from tests that the
htaccess/ini settings have no obvious effect on the ob functions (maybe
buffer size?).

Cheers
Arno


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux