Re: All Code Executing Even After header() Redirect
| From: | David Otton | Date: | Mon, 03 Mar 2003 20:01:35 +0000 |
| Subject: | Re: All Code Executing Even After header() Redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137957@lists.php.net to get a copy of this message | ||
On Mon, 03 Mar 2003 14:50:00 -0500, you wrote:
>I thought the code below the header() redirect would not actually be
>executed unless the user was logged in and allowed to proceed. Is this how
>PHP is supposed to work? Is there any way to prevent the script from
header() isn't a goto - it just outputs a header. A line of text, just
like echo(); It's the responsibility of the client to then interpret
that line of text and make another http request.
You're seeing correct behaviour, it's not supposed to alter program
flow.
>executing below a certain point if the user is not logged in?
exit()