<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.php.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.outcontrol.php',
    1 => 'Output Control',
    2 => 'Output Buffering Control',
  ),
  'up' => 
  array (
    0 => 'refs.basic.php.php',
    1 => 'Affecting PHP\'s Behaviour',
  ),
  'prev' => 
  array (
    0 => 'function.opcache-reset.php',
    1 => 'opcache_reset',
  ),
  'next' => 
  array (
    0 => 'outcontrol.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/outcontrol/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.outcontrol.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.outcontrol" class="book">
 
 <h1 class="title">Output Buffering Control</h1>
 

 <div id="intro.outcontrol" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="para">
   The Output Control functions allow you to control when output is
   sent from the script. This can be useful in several different
   situations, especially if you need to send headers to the browser
   after your script has begun outputting data. The Output Control
   functions do not affect headers sent using
   <span class="function"><a href="function.header.php" class="function">header()</a></span> or <span class="function"><a href="function.setcookie.php" class="function">setcookie()</a></span>,
   only functions such as <span class="function"><a href="function.echo.php" class="function">echo</a></span> and data between
   blocks of PHP code.
  </p>
 </div>

 






 




 



 



 



 






 








<ul class="chunklist chunklist_book"><li><a href="outcontrol.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="outcontrol.configuration.php">Runtime Configuration</a></li></ul></li><li><a href="outcontrol.constants.php">Predefined Constants</a></li><li><a href="outcontrol.output-buffering.php">Output Buffering</a></li><li><a href="outcontrol.flushing-system-buffers.php">Flushing System Buffers</a></li><li><a href="outcontrol.user-level-output-buffers.php">User-Level Output Buffers</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="outcontrol.what-output-is-buffered.php">What Output Is Buffered?</a></li><li><a href="outcontrol.nesting-output-buffers.php">Nesting Output Buffers</a></li><li><a href="outcontrol.buffer-size.php">Buffer Size</a></li><li><a href="outcontrol.operations-on-buffers.php">Operations Allowed On Buffers</a></li><li><a href="outcontrol.output-handlers.php">Output Handlers</a></li><li><a href="outcontrol.working-with-output-handlers.php">Working With Output Handlers</a></li><li><a href="outcontrol.flags-passed-to-output-handlers.php">Flags Passed To Output Handlers</a></li><li><a href="outcontrol.output-handler-return-values.php">Output Handler Return Values</a></li></ul></li><li><a href="outcontrol.examples.php">Examples</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="outcontrol.examples.basic.php">Basic usage</a></li><li><a href="outcontrol.examples.rewrite.php">Output rewrite usage</a></li></ul></li><li><a href="ref.outcontrol.php">Output Control Functions</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.flush.php">flush</a> — Flush system output buffer</li><li><a href="function.ob-clean.php">ob_clean</a> — Clean (erase) the contents of the active output buffer</li><li><a href="function.ob-end-clean.php">ob_end_clean</a> — Clean (erase) the contents of the active output buffer and turn it off</li><li><a href="function.ob-end-flush.php">ob_end_flush</a> — Flush (send) the return value of the active output handler
   and turn the active output buffer off</li><li><a href="function.ob-flush.php">ob_flush</a> — Flush (send) the return value of the active output handler</li><li><a href="function.ob-get-clean.php">ob_get_clean</a> — Get the contents of the active output buffer and turn it off</li><li><a href="function.ob-get-contents.php">ob_get_contents</a> — Return the contents of the output buffer</li><li><a href="function.ob-get-flush.php">ob_get_flush</a> — Flush (send) the return value of the active output handler,
   return the contents of the active output buffer and turn it off</li><li><a href="function.ob-get-length.php">ob_get_length</a> — Return the length of the output buffer</li><li><a href="function.ob-get-level.php">ob_get_level</a> — Return the nesting level of the output buffering mechanism</li><li><a href="function.ob-get-status.php">ob_get_status</a> — Get status of output buffers</li><li><a href="function.ob-implicit-flush.php">ob_implicit_flush</a> — Turn implicit flush on/off</li><li><a href="function.ob-list-handlers.php">ob_list_handlers</a> — List all output handlers in use</li><li><a href="function.ob-start.php">ob_start</a> — Turn on output buffering</li><li><a href="function.output-add-rewrite-var.php">output_add_rewrite_var</a> — Add URL rewriter values</li><li><a href="function.output-reset-rewrite-vars.php">output_reset_rewrite_vars</a> — Reset URL rewriter values</li></ul></li></ul></div><?php manual_footer($setup); ?>