Re: HTTP headers and include()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:09 PM +0100 7/12/09, Ashley Sheridan wrote:
On Sunday 12 July 2009 12:01:12 Lenin wrote:
 On Fri, Jul 10, 2009 at 12:49 PM, Michael A. Peters <mpeters@xxxxxxx> wrote:
 > James Colannino wrote:
 >
 >
 >
 > White space can cause this - make sure your code has <?php as the very
 > top and ?> at the very bottom, or the white space may trigger the web
 > server to send a header and the white space as data before the cookie for
 > session_start() is sent.

 Well, at the end of the file dont put a ?> on your php files especially
 which files you are gonna include at others. It would save you some
 dreadfull buggy times. Its also practiced in the framework programming.

Well, some frameworks insist on it being in there. I tend to always include
them, but I use a text editor that I know won't add characters to the end
after the final ?>

--
Thanks,
Ash

Ash:

I do the same. It would brother me (lack of symmetry) if I didn't include a ?> at the end of my scripts.

As for additional characters after the ?>, I make sure my terminations don't have any. Just because characters can be white space doesn't mean you can't detect them.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux