Welcome Guest, Not a member yet? Register   Sign In
Loading Table Class In a View and Checking Errors
#1

[eluser]Unknown[/eluser]
Hello. I'm new to Codeignitor and have what it probably a noob question.

Is it possible to load the table class, or any class, into a view?

I tried:

$this->load->library('table');

in a view and it did not work. When I used this in the controller, there weren't any problems.

Also, I tried checking error logs, both Apache and Codeignitor PHP logs, but nothing was showing up indicating that the was a problem with doing this.

Thanks for any help.
#2

[eluser]mi6crazyheart[/eluser]
According to MVC approach view is not the right place for loading any library. Codeigniter strictly follow this MVC approach. Due to this codeigniter doesn't allow to load any library in VIEW part. VIEW is the place which is only for end user presentation. So, if u need to do any back end business logic type of work then do that in controller.




Theme © iAndrew 2016 - Forum software by © MyBB