Re: HTTP headers and include()

From: Date: Sun, 12 Jul 2009 11:09:42 +0000
Subject: Re: HTTP headers and include()
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-295271@lists.php.net to get a copy of this message
On Sunday 12 July 2009 12:01:12 Lenin wrote: > On Fri, Jul 10, 2009 at 12:49 PM, Michael A. Peters <mpeters@mac.com> 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 http://www.ashleysheridan.co.uk

« previous php.general (#295271) next »