diff --git a/functions/outcontrol.xml b/functions/outcontrol.xml index 67d32dbc5a..ce0b7d4160 100644 --- a/functions/outcontrol.xml +++ b/functions/outcontrol.xml @@ -3,15 +3,31 @@ Output Control - - Output Control - + + 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 began outputing data. The Output Control + functions do not affect headers sent using + header, only functions such as + echo and data between blocks of PHP code. + + + + <function>Output Control</function> example + + + + + + See also header. + - flush - Flush the output buffer + flush Flush the output + buffer Description @@ -43,15 +59,16 @@ - This function will turn output buffering. While output buffering - is active there will be no rel output from the script, the output - is appended to an internal buffer instead. + This function will turn output buffering on. While output buffering + is active no output is sent from the script, instead the output + is stored in an internal buffer. The contents of this internal buffer may be copied into a string - variable using ob_get_contents. Real output - happens when ob_end_flush is called and - ob_end_clean will just silently discard the + variable using ob_get_contents. To output + what is stored in the internal buffer, use + ob_end_flush. Alternatively, + ob_end_clean will silently discard the buffer contents. @@ -79,7 +96,7 @@ - This will return the content of the output buffer or FALSE, if + This will return the contents of the output buffer or FALSE, if output buffering isn't active. @@ -108,10 +125,10 @@ This function will send the contents of the output buffer (if any) and turn output buffering off. If you want to further - process the buffers content you have to call + process the buffer's contents you have to call ob_get_contents before - ob_end_flush as the buffer contents get - discarded after output. + ob_end_flush as the buffer contents are + discarded after ob_get_contents is called. See also ob_start, @@ -137,8 +154,8 @@ - This function discards the content of the output buffer and - turns off output buffering. + This function discards the contents of the output buffer and + turns off output buffering. See also ob_start and