Quote:
|
Originally Posted by kurdapya
u think i would still ask here if i've understood the manual.. ?
AND I SAID I WANT EXAMPLES...... and next time... dont reply if u dont know any example.. thanks nway....
|
I READ YOU WANT EXAMPLES and next time better dont make guidelines how to behave in here, its not up to you. Anyways:
ob_flush() or just flush() are functions depending on many others. You can start a "buffered area" in your browser, using ob_start(). Everything usually output by the browser will be buffered in an internal buffer until the script recieves the ob_end_flush(). Now everything inbetween ob_start() and ob_end_flush() will be send to the browser. The Difference between ob_flush() and ob_end_flush() is just, that ob_flush() does not stop the buffering but just output everything what has been buffered since ob_start() but continue buffering until it is stopped by ob_end_flush().
The example above will output:
FYI:
ob_start([callback function]) - Starts an output buffering session.
ob_flush() - Send the contents of the buffer to the client and clear the buffer.
ob_get_contents() - Returns the contents of the buffer. The buffer is not cleared.
ob_end_clean() - Ends the current buffering session and purges the buffer.
ob_end_flush() - Ends the current buffering session and displays the buffer.
ob_get_length() - (Version >= 4.0.2) Return the size of the current buffer.
ob_get_clean() - (Version >= 4.3) Composite of ob_get_contents() and ob_end_clean(). The buffer is returned and the session ends.