Redirect with exit()
While creating the admin section for this blog, I needed the script to redirect if the user was not logged in, however I did not realise that by default $this->redirect(); does not include an exit();
I came across an addition to the redirect function to call an exit() with it.
Rather than using
<?php $this->redirect('controller/action'); exit(); ?>You can simply use:
<?php $this->redirect('controller/action', null, true); ?>

No Comments