Welcome Guest, Not a member yet? Register   Sign In
Load libraries from a subfolder
#1

[eluser]mattalexx[/eluser]
How do I load libraries from a subfolder of application/libraries?
#2

[eluser]Pascal Kriete[/eluser]
Currently isn't possible without making changes to the loader. Sorry.
#3

[eluser]mattalexx[/eluser]
What are the cons of just using require_once to load my own classes? If I go that route, would it be better practice to put my files somewhere else other than in "libraries"? If so, where should I put them?
#4

[eluser]Pascal Kriete[/eluser]
They won't automatically be tied to the CI super-object (so no $this->whatever), and the config files won't be autoloaded. I think that's the only two.

You can still put them in libraries (APPPATH.'libraries/myfolder/myclass'.EXT) or make your own folder parallel to the libraries folder (APPPATH.'my_libraries/myfolder/myclass'.EXT).
#5

[eluser]mattalexx[/eluser]
Thanks for your help. I'm learning this fast-- I can't believe how small that learning curve is on this!




Theme © iAndrew 2016 - Forum software by © MyBB