Re: note 15377 added to function.header

From: Date: Fri, 07 Sep 2001 11:18:35 +0000
Subject: Re: note 15377 added to function.header
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-17769@lists.php.net to get a copy of this message
The first header example below should never had worked according to the HTTP specs. Therefore the behaviour observed in the Windows-based server is incorrect, non-standard and buggy. Go to www.w3c.org for more information on the HTTP protocol. I will add the note above to your contribution. --- dptagamolila@k2ia.com wrote: > the header command in php can be used with the > location parameter to be able to redirect the page > to another one as long as header information has not > been sent previously. > > e.g. > > header(" location : http://yourlocation/here"); > > This code will work well with PHP hosted on an IIS > server running in an NT platform, but this same code > will not work in a red hat/apache/php platform. > > Apache has a weird requirement in sending header > information. For the previous code to work well, the > location parameter should be coded precisely as > follows: > e.g. > > header("Location: http://yourlocation/here"); > > Note that location has changed to "Location:" and > that there is no space in between the colon symbol > and the location keyword. Don't ask me why or how, > but that is the observed behavior in Apache. The > documentation says something to the same effect > except tha it did not explain why it does so.... > > We programmers are a very cryptic group of people... > duh.... we really need to spruce up documentation > methods :) > > happy RECODING..... > > http://www.php.net/manual/en/function.header.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com

« previous php.notes (#17769) next »