View Full Version : Multiple ob_starts?
JAB Creations
02-07-2008, 03:29 AM
I need to do two ob_starts....
ob_start("ob_gzhandler");
ob_start("sehl");
If we're not allowed two how do we merge them?
tech_support
02-07-2008, 05:33 AM
function callback($buffer) {
$buffer = ob_gzhandler($buffer);
$buffer = sehl($buffer);
return $buffer;
}
ob_start('callback');
codeexploiter
02-07-2008, 06:09 AM
You can find the explanation from php.net (http://www.php.net)
"Output buffers are stackable, that is, you may call ob_start() while another ob_start() is active. Just make sure that you call ob_end_flush() the appropriate number of times. If multiple output callback functions are active, output is being filtered sequentially through each of them in nesting order." more.. (http://in.php.net/manual/en/function.ob-start.php)
According to this explanation it is allowed to maintain more than one output buffers.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.