Re: web page expired

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux