There's limit for loaded libraries? |
[eluser]Unknown[/eluser]
Hello, I'm with a big problem, I have a controller managing all "profile user"(e.g.: save, update,...) and this controller loads 3 models and 3 libraries inside the constructor. The problem is: When I load a new library in some function of this class the system returns this error(independent of which class I want to load) : Quote:A PHP Error was encountered If I load the library in "autoload.php" it works, but I can't load all libraries there... I have no idea what is happening. the constructor: Code: public function __construct() This is a bug or some problem with my code? Can someone help me? Thanks
[eluser]Unknown[/eluser]
Try with: $this->load->library(array('lib1','lib2','libN')); I don't know what cause the problem, but I think everything is gonna be alright with this code
[eluser]Unknown[/eluser]
Hi Plamba95, I've tried it and didn't works. But you with this give an idea and I found the issue. I created my own library like this: Code: class LoginVerifica extends CI_Controller { I read this documentation: http://ellislab.com/codeigniter/user-gui...aries.html and I saw my mistake, my class was extending to "controller" and had a constructor, I've changed to this: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); And now it's working loading multiple libraries. Thanks ![]()
[eluser]InsiteFX[/eluser]
Try adding this to your Constructor affter everything else: Code: parent::__construct();
|
Welcome Guest, Not a member yet? Register Sign In |