Skip to content

Instantly share code, notes, and snippets.

@iNem0o
Created November 26, 2013 16:02
Show Gist options
  • Save iNem0o/7660947 to your computer and use it in GitHub Desktop.
Save iNem0o/7660947 to your computer and use it in GitHub Desktop.
ob_disable()
function ob_disable() {
ini_set('output_buffering', 'off');
ini_set('zlib.output_compression', false);
ini_set('implicit_flush', true);
ob_implicit_flush(true);
while (ob_get_level() > 0) {
$level = ob_get_level();
ob_end_clean();
if (ob_get_level() == $level) break;
}
if (function_exists('apache_setenv')) {
apache_setenv('no-gzip', '1');
apache_setenv('dont-vary', '1');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment