I have a few questions regarding headers and output buffering.
I know headers must be send before output or they will not work, and that output buffering stores all HTML into a buffer and sends it as one as opposed to PHP processes sent bits at a time.
So does this mean when output buffering is on, all content is collected into one variable and where ever the headers were defined in the script they will be placed at the top/first?
And if output buffering is off you have to declare headers before any output?
And also to use any output buffering functions such as ob_clean() you need output buffering to be on? as if output buffering was off, you couldn't clean, 'take back', anything as it would of already been sent?
Finally is output buffering turned on/off within php.ini? as my XAMPP local host server seems to have output buffering on and my VPS doesn't, meaning I need to go to my VPS php.ini?