Re: web page expired
| From: | Ashley Sheridan | Date: | Mon, 16 Jun 2014 07:24:31 +0000 |
| Subject: | Re: web page expired | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323487@lists.php.net to get a copy of this message | ||
On Mon, 2014-06-16 at 04:41 +0300, hadi wrote:
> How to redirect the user in web page expired can someone give me example
> where to place the redirect code ?
>
> my code
>
> header("location:logout.php");
>
> thanks.
>
As was mentioned in the other thread, this header (and it should really
be 'Location' instead of 'location') requires an absolute URL. It can
work with a relative one, but may produce inconsistent results. Also,
you can only use it if there's been no output at all sent to the browser
in this session. That means not even a single space or new line.
You can test if it's ok to redirect using the headers_sent() function
--
Thanks,
Ash
http://www.ashleysheridan.co.uk