Welcome Guest, Not a member yet? Register   Sign In
[solved] die() function
#5

[eluser]Jason Stanley[/eluser]
I use a custom controller.

Code:
class Admin_Controller extends CI_Controller
{
  public function __construct()
  {
    parent::__construct();
    if ( ! $this->logged_in)
    {
      redirect('user/login');
    }
    elseif
    {
      redirect('admin');
    }
  }
}

I just had a play around. If you want to do it your way.

Code:
echo $this->load->view('general_view', $data, true);

Not entirely sure why what you had isn't working. I would have thought the view function would finish before die(). The above works because it returns the contents of the buffer. You then echo it out before the script finishes.


Messages In This Thread
[solved] die() function - by El Forum - 01-19-2012, 03:50 AM
[solved] die() function - by El Forum - 01-19-2012, 03:59 AM
[solved] die() function - by El Forum - 01-19-2012, 04:02 AM
[solved] die() function - by El Forum - 01-19-2012, 04:38 AM
[solved] die() function - by El Forum - 01-19-2012, 05:06 AM
[solved] die() function - by El Forum - 01-19-2012, 07:42 AM
[solved] die() function - by El Forum - 01-19-2012, 12:03 PM
[solved] die() function - by El Forum - 01-19-2012, 04:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB