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

[eluser]CroNiX[/eluser]
Die prevents the CI script from completing, which won't output the view. Using load->view() doesn't execute immediately....it compiles the output after the controller finishes executing and assigns the output. To get around that, manually load the view and output it, then die().
Code:
echo $this->load->view('general_view', $data, TRUE);
die();

Edit: Didn't see Jasons answer which is basically the same thing.


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