Re: Problem...header already sent by
| From: | Peter | Date: | Tue, 05 Feb 2002 06:14:33 +0000 |
| Subject: | Re: Problem...header already sent by | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83535@lists.php.net to get a copy of this message | ||
Hi Ryan,
I tried and took the <html></html> tags out and I still get the same
messaage. Why?
Thanks,
Peter
> Hello Peter.
>
> I discribe my reply below:
>
> > **************************
> > Warning: Cannot add header information - headers already sent by (output
> > started at C:\apache\htdocs\proj\sports\phps\verify.php:2) in
> > C:\apache\htdocs\proj\sports\phps\verify.php on line 26
> > ***************************
>
> This warning message appear when the server already send data to the
client.
>
> > 1. <html>
> > 2. <?php
> > ....
> >
> >
> > 23. if (!$auth) {
> > 24. header("www-Authenticate: Basic realm='Private'");
> > 25. header("HTTP/1.0 401 Unauthrized");
> > ...
> > ?>
> > </html>
>
> In the above code, the <html></html> tag has been sent to the client
browser
> already, thus when calling header function it would cause a warning
telling
> you that data has been rendered already.
>
> Hope this help.
>
> Ryan
>
>