Re: Help in php

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Help in php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19521@lists.php.net to get a copy of this message
> I just want to correct this error that floats around on this list all > the time. If you are going to send HTTP headers, make sure and speak > HTTP. > > for example: > > header('302'); > header("Location: $URL"); > > 302 may not be what you want to say, maybe you want to say 303? It is > up to you the application developer. See the HTTP spec (found at > http://www.w3.org/) for more information. > > I know that this is anal, but if you are going to build an > application, you might as well do it right. (It doesn't take any more > effort). Perhaps a tad too anal. Sending a header('Location: blah') will automatically cause PHP to send back a 302. your header('302') is redundant. -Rasmus

« previous php.general (#19521) next »