Re: redirect to a static page

From: Date: Sat, 20 Jun 2009 20:01:37 +0000
Subject: Re: redirect to a static page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-294369@lists.php.net to get a copy of this message
Vit wrote: > Hi all, > > I'm trying to understand how to redirect to a static page.... > > here you are the code (it seem to be a stupid code, but I'm just > debugging..... > > <?php > > header( "Location: http://www.google.com" ); > ?> > > instead of being redirect to www.google,com, I get the following error: > > Warning: Cannot modify header information - headers already sent by > > what can be??? how can I solve it?? The header needs to be the very first output your script sends out. No other output may come before it. This is clearly discussed in the manual at <http://www.php.net/header>.

« previous php.general (#294369) next »