Re: Am I blind? simple 15 line code producing error
| From: | Sascha Cunz | Date: | Sun, 03 Nov 2002 18:38:36 +0000 |
| Subject: | Re: Am I blind? simple 15 line code producing error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122573@lists.php.net to get a copy of this message | ||
> Yes, I use those in other pages with no problem..it just this page
> causes some problems..
Do you use Header('Location:...') in those other scripts? I can't see any
reason inside the script you posted, that could produce this behaviour. Can
you try it without the two require's, just to be sure?
btw: $HTTP_SESSION_VARS[user_id] should really be
$HTTP_SESSION_VARS['user_id']
-Sascha
>
> -----Original Message-----
> From: Sascha Cunz [mailto:Sascha@GaNoAn.org]
> Sent: Sunday, November 03, 2002 1:03 PM
> To: Paul; php-general@lists.php.net
> Subject: Re: [PHP] Am I blind? simple 15 line code producing error
>
> > require_once ("config.inc");
> > require_once "classes/HtmlTemplate.class";
> >
> > The error is:
> > Warning: Cannot add header information - headers already sent by
>
> (output
>
> > started by.. ..line 6) ...on line 12
> >
> > Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
> > Line 12 is the line starting with header
>
> You should check, if these include files contain anything after their
> closing
> ?>.
>
> -Sascha