Search code examples
phpoutput-buffering

PHP Output Buffering Check?


Possible Duplicate:
PHP - How Detect if Output Buffering is Turned On

How can I check in PHP if output_buffering is set to On? I have to troubleshoot a site and I have no access to the hosting panel.

Something like:

if(output_buffering == 'On')
{
    echo 'It is On';
}
else
{
    echo 'It is NOT On';
}

Thank you!


Solution

  • You should be able to do this with ini_get(). I didn't test it, but I am pretty sure it will suit your needs since ini_get() is used for that purpose: checking php.ini options.