Re: Re: Does Location: headers constantly
| From: | Miguel Cruz | Date: | Fri, 05 Jul 2002 06:56:58 +0000 |
| Subject: | Re: Re: Does Location: headers constantly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105575@lists.php.net to get a copy of this message | ||
On Thu, 4 Jul 2002, Analysis & Solutions wrote:
> But, the thing is, I'm under the impression that PHP (and/or Apache?)
> doesn't send anything else from your script once a Location header is
> sent. I just confirmed this with two different tests.
Interesting. What tests did you perform?
Given this PHP file:
<?
header('Location: page2.php');
echo "This is the text after the location header.\n";
?>
I get these results:
% telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /loc.php
HTTP/1.1 302 Found
Date: Fri, 05 Jul 2002 06:54:22 GMT
Server: Apache/1.3.26 (Unix)
X-Powered-By: PHP/4.2.1
Location: page2.php
Connection: close
Content-Type: text/html
This is the text after the location header.
Connection closed by foreign host.
miguel