Output Buffering
Listed In PHP and MySQL » General Development — Viewing Full TutorialAt-the-top-of-the-page-only PHP functions are:
header()
setcookie()
session_start()
And a few others that I can't be bothered to think of. This basically means they can NORMALLY only be called before any HTML output is sent to the browser.
Why this is isn't the point - how to bypass it is the aim of this tutorial.
If you're a code reader or a tutorial goer reading harder tutorials that have a lot of things going on in the code at one time, you might see the functions called ob_start(), and ob_end_flush().
What do they do then?
This pair of functions create an output buffer that isn't anything to do with the browser - YET. Think of it like this:
Remember, when you've
inished sending the buffer you MUST use ob_end_flush() to clear the buffer, otherwise your /tmp directory might get b0rked.. AND WE DON'T WANT THAT DO WE DIDDUMS LOL ROFL LMAO OMG GTFO WTF?
Thanks!
Will
