downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.ob-get-flush.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.outcontrol.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.ob-get-flush.php',
   
1 => 'ob_get_flush',
  ),
 
'up' =>
  array (
   
0 => 'ref.outcontrol.php',
   
1 => 'Output Control Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.ob-get-contents.php',
   
1 => 'ob_get_contents',
  ),
 
'next' =>
  array (
   
0 => 'function.ob-get-length.php',
   
1 => 'ob_get_length',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.ob-get-flush" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ob_get_flush</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">ob_get_flush</span> &mdash; <span class="dc-title">Flush the output buffer, return it as a string and turn off output buffering</span></p>

 </div>
 
 <a name="function.ob-get-flush.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>ob_get_flush</b></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   <b>ob_get_flush()</b> flushes the output buffer, return
   it as a string and turns off output buffering.
  </p>
  <blockquote><p><b class="note">Note</b>:
   <span class="simpara">
    This function is similar to <a href="function.ob-end-flush.php" class="function">ob_end_flush()</a>, except
    that this function returns the buffer as a string.
   </span>
  </p></blockquote>
 </div>


 <a name="function.ob-get-flush.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the output buffer or <b><tt class="constant">FALSE</tt></b> if no buffering is active.
  </p>
 </div>


 <a name="function.ob-get-flush.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>ob_get_flush()</b> example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//using&nbsp;output_buffering=On<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ob_list_handlers</span><span style="color: #007700">());<br /><br /></span><span style="color: #FF8000">//save&nbsp;buffer&nbsp;in&nbsp;a&nbsp;file<br /></span><span style="color: #0000BB">$buffer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ob_get_flush</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'buffer.txt'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$buffer</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ob_list_handlers</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents para"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; default output handler
)
Array
(
)
</pre></div>
    </div>
   </div><p>
  </p>
 </div>


 <a name="function.ob-get-flush.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.ob-end-clean.php" class="function" rel="rdfs-seeAlso">ob_end_clean()</a> - Clean (erase) the output buffer and turn off output buffering</li>
    <li class="member"><a href="function.ob-end-flush.php" class="function" rel="rdfs-seeAlso">ob_end_flush()</a> - Flush (send) the output buffer and turn off output buffering</li>
    <li class="member"><a href="function.ob-list-handlers.php" class="function" rel="rdfs-seeAlso">ob_list_handlers()</a> - List all output handlers in use</li>
   </ul><p>
  </p>
 </div>
 

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites