Welcome Guest, Not a member yet? Register   Sign In
Loading libraries in controller vs. loading in CI instance
#6

[eluser]WanWizard[/eluser]
The loader doesn't support that, but there is an (undocumented) work-around:
Code:
$mylib =& load_class('MyLibrary'); // works only for libraries

For CI 2.0, you can use this for other classes as well:
Code:
$mymodel =& load_class('MyModel', 'class_directory');
where 'class_directory' is a directory in the APPPATH or BASEPATH.


Messages In This Thread
Loading libraries in controller vs. loading in CI instance - by El Forum - 07-22-2010, 09:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB