Re: Redirect page
| From: | Ben Peter | Date: | Tue, 20 Feb 2001 11:49:38 +0000 |
| Subject: | Re: Redirect page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40736@lists.php.net to get a copy of this message | ||
Rosen,
You have to make sure that nothing is output before the header function.
Make sure that you neither employ an echo or print before, and have
nothing outside of th ephp code (the part enwrapped in <?php or <? and
?>), not even whitespace.
You critical spot seems to be line 2 in go.php
Cheers,
Ben
Rosen wrote:
>
> Hi,
> I have php script and I want to redirect user to different pages.
> I tryed with
> header("Location: main.php");
>
> but i receive error:
>
> Warning: Cannot add header information - headers already sent by (output
> started at F:\Inetpub\wwwroot\pernik\go.php:2) in
> F:\Inetpub\wwwroot\pernik\go.php on line 6
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net