Gary Mort wrote:
When your including say...12 different files into a page, sometimes
script number 8 needs to send header information. So the practice is to
accumulate all the content information into a variable, and send that at
the end of the script.
This makes it no longer possible to mix HTML and PHP code in a
document(ok, it's possible, but outside the scope of this email) as the
second you have a raw HTML outside the PHP execution tags, you have lost
your chance of sending header data and are into the sending of body data.
The problem is when at the end of a file you place ?>[space]
The PHP interpreter sees that there is a charector after the ?> and
sends it. So now content has begun and you can no longer send headers.
Ah! Now I understand and see where the problem is. I am surprised that I
haven't run into this so far, but maybe I am just lucky or the IDEs I use take
of this.
Thanks! You should seek a carreer as instructor. :)
David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php