Reputation: 1393
I'm facing a strange problem with CI:
After my view is loaded, I select an option in the form and send the request. My backend handles it and sends me a response. In case of an error I catch the Exception and want to load the same view but with a error message on it.
The problem is I get an empty page. When I place a die()
command in the last line of the view, I can see the page with my error message. If I place the die()
command directly after
$this->load->view($template, $vars)
in the controller I get an empty page, the same way as on beginning without any die()
commands.
I've set error_reporting to E_ALL and display_errors is on, but no error occurs.
What's going wrong here?
I appreciate any kind of help in advance!
Cheers! naptoon
Upvotes: 0
Views: 768
Reputation: 13467
You cannot put exit()
or die()
directly after $this->load->view()
, unless you return the view's output using the third parameter.
I've outlined why here: Use Loader class within a hook in CodeIgniter
Upvotes: 3