![]() |
Redirect page after some delay - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Redirect page after some delay (/showthread.php?tid=28359) |
Redirect page after some delay - El Forum - 03-09-2010 [eluser]Suhas nazir[/eluser] Is there any way to redirect a page in code igniter after a particular period of time.like meta.. Redirect page after some delay - El Forum - 03-09-2010 [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() Redirect page after some delay - El Forum - 03-09-2010 [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. Redirect page after some delay - El Forum - 03-09-2010 [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. Redirect page after some delay - El Forum - 03-09-2010 [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... Redirect page after some delay - El Forum - 03-09-2010 [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. Redirect page after some delay - El Forum - 03-09-2010 [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. Redirect page after some delay - El Forum - 05-19-2010 [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-guide/libraries/output.html Redirect page after some delay - El Forum - 08-09-2010 [eluser]Cesar Kohl[/eluser] I inserted this: Code: $this->output->set_header('refresh:3; url='.$this->base); Thank you for this tip, Alt_F4! Redirect page after some delay - El Forum - 10-23-2010 [eluser]Unknown[/eluser] use this code in your controller : header("Refresh ![]() eg: header("Refresh:10;url=".base_url()."index.php/welcome"); |