Redirect page after some delay |
[eluser]Suhas nazir[/eluser]
Is there any way to redirect a page in code igniter after a particular period of time.like meta..
[eluser]troy_mccormick[/eluser]
A read through the entire user guide may be in order for you, but here is the relevant section for you: Quote:redirect()
[eluser]Suhas nazir[/eluser]
Sry i am actually looking to redirect a page after a particular period of time for example after a 5 second..is there any way.
[eluser]troy_mccormick[/eluser]
Why not put the meta tag within your view then? I'm sure you could extend the URL Helper to let the refresh time to be configurable too. Just a thought.
[eluser]Suhas nazir[/eluser]
meta tag is some what html oriented infact i am looking for a codeigniter code any way thanks fr ur replay...
[eluser]nelson.wells[/eluser]
Look up the php function sleep(). Maybe in your controller you could sleep the script for 5 seconds (or however long) before you send the headers. I haven't tried it, but it is worth a shot.
[eluser]dark_lord[/eluser]
What about trying to embed this one on your meta tags? <meta http-equiv="refresh" content="600"> 600 - is the amount of time to wait before it redirects.
[eluser]Unknown[/eluser]
Late reply but I believe that this will do what you want: Code: $this->output->set_header('refresh:5;url=wherever.php'); further documentation can be found here: http://ellislab.com/codeigniter/user-gui...utput.html
[eluser]Cesar Kohl[/eluser]
I inserted this: Code: $this->output->set_header('refresh:3; url='.$this->base); Thank you for this tip, Alt_F4!
[eluser]Unknown[/eluser]
use this code in your controller : header("Refresh ![]() eg: header("Refresh:10;url=".base_url()."index.php/welcome"); |
Welcome Guest, Not a member yet? Register Sign In |