Re: header()

From: Date: Wed, 04 Oct 2006 12:43:43 +0000
Subject: Re: header()
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-27208@lists.php.net to get a copy of this message
Niel Archer wrote: > Hi Alf > > >> Is this the correct method to use in Windows? >> > > No, it's not the correct method on ANY platform. Before asking a > question on these lists, it's wise to check the documentation first. > > >> Note: HTTP/1.1 requires an absolute URI as argument to Location: including the scheme, >> hostname and absolute path, but some clients accept relative URIs. >> I have copied the code almost verbatim out of the manual and it still does not work. /* Redirect to a different page in the current directory that was requested */ $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'index.shtml'; $ReturnTo = sprintf("http://%s%s/%s", $host, $uri, $extra); echo "<br>".$ReturnTo; header("Location: $ReturnTo"); exit; and when I cut and paste the line produced by the echo into the, can I call it "go box", at the top of the screen and press enter it goes where I want? -- Regards, Alf Stockton www.stockton.co.za Your sister swims out to meet troop ships. My email disclaimer is available at www.stockton.co.za/disclaimer.html

« previous php.windows (#27208) next »