RE: [PHP] How to disable output buffer per script

From: Date: Tue, 08 Jun 2004 18:05:37 +0000
Subject: RE: [PHP] How to disable output buffer per script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187903@lists.php.net to get a copy of this message
Curt Zirzow wrote: >> I have a feeling PHP is buffering it or something. It there any >> command I can use to disable such buffering for just this script so >> I can see some useful feedback. Thanks! > > Use this at the top of the script: > ini_set('output_buffer', 0); The "output_buffering" setting cannot be controlled via ini_set(), at least according to the manual. I want to say that I confirmed this a long time ago but I can't recall for sure. > Or, as I usually set up for my cli environment (since they ususally > desire no buffering), create a php-cli.ini file that has > output_buffering turned off. That's a good idea. But to do it on a per script basis (where it's undesirable to alter the global buffering setting) I think the only way is to call ob_end_flush() at the top of the script...

« previous php.general (#187903) next »