This article describes how to enable and disable output buffering for PHP scripts by using the output_buffering directive in an .htaccess file.
By default, when PHP processes a script, it sends output to the client in multiple chunks until script processing is complete. You can change this behavior and set PHP to buffer output during script processing instead.
When output buffering is enabled, PHP sends all of the output to the client only after script processing is complete. There are two main reasons why you may want to do this:
To set the output_buffering directive, follow these steps:
php_value output_buffering x
To disable output buffering, modify the line as follows:
php_value output_buffering Off
<?php phpinfo(); ?>
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.