Welcome Guest, Not a member yet? Register   Sign In
How to exit() ?
#3

[eluser]Buso[/eluser]
I didn't say I was taking decisions from within my views. :gulp:

I'll give you an example, this goes inside Frontend_controller's constructor

Code:
if(UNDER_MAINTENANCE) {
  
  $this->load->view('under_maintenance');

  exit;
  
}

If I use return; instead of exit;, the under_maintenance view will be loaded, but - as expected - the normal page will be appended at the end (the page that would be loaded if the site wasn't under maintenance)


Messages In This Thread
How to exit() ? - by El Forum - 04-22-2010, 06:05 AM
How to exit() ? - by El Forum - 04-22-2010, 09:27 AM
How to exit() ? - by El Forum - 04-22-2010, 10:11 AM
How to exit() ? - by El Forum - 04-22-2010, 10:27 AM
How to exit() ? - by El Forum - 04-22-2010, 10:38 AM
How to exit() ? - by El Forum - 04-22-2010, 10:52 AM
How to exit() ? - by El Forum - 04-22-2010, 10:59 AM
How to exit() ? - by El Forum - 04-22-2010, 11:19 AM
How to exit() ? - by El Forum - 04-22-2010, 11:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB