On Wed, Sep 04, 2002 at 12:50:01PM -0000, Amol Hatwar wrote:
Ahhh, see I'll make it sound simple - before any HTML is sent to the browser, the server dishes out headers to it. The 'Content-Type' and Content-Size is one example, cookies are another. However this process only happens once, that is to say you cannot send headers after you've sent the browser HTML.
So do your includes _before_ sending HTML and do not print or echo anything in the includes unless you obviously can't do with out it. Also for debugging, set variables rather than using die().
Not too sure about this, but iirc, this changes with the newer version of PHP.
Output is buffered, so you can have headers anywhere.
Need to confirm though.