How to call codeigniter controller function from view? When i call the function in a controller, get a 404 page.
I know this is bad.. But I have been in hard situation where it is impossible to put this back to controller or model.
My solution is to call a function on model. It can be do inside a view. But you have to make sure the model has been loaded to your controller first.
Say your model main_model, you can call function on the model like this on your view : $this->main_model->your_function();
Hope this help. :)