Re: PHP - REDIRECTION

From: Date: Tue, 11 Mar 2014 13:21:37 +0000
Subject: Re: PHP - REDIRECTION
References: 1 2 3 4  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-18459@lists.php.net to get a copy of this message
I can appreciate that and thank you for your time and replies, I will not hold any longer and will use the support resources provided if I have any further queries. Keep up the great work and thanks. Kind regards, Ansego. On Tue, Mar 11, 2014 at 11:12 PM, Christoph Becker <cmbecker69@gmx.de>wrote: > Ansego wrote: > > > The header has to be at the top of the page? > > Not necessarily. header() has just to be called before any output is sent. > > > why not call it redirect? > > Probably because the Location header is part of HTTP[1], and actually, > the redirect is not done by PHP, but by the client. > > If you prefer to call redirect($url) nonetheless, you can easily define > your own function: > > function redirect($url) { > header('Location: '. $url); // further arguments as desired > } > > BTW: the webmaster mailing list is probably not the appropriate place > for such requests/discussions[2]. > > [1] <https://tools.ietf.org/html/rfc2616> > [2] <http://www.php.net/support.php> > > -- > Christoph M. Becker > > >

« previous php.webmaster (#18459) next »