Welcome Guest, Not a member yet? Register   Sign In
Loading custom libraries
#1

[eluser]Unknown[/eluser]
Hello,

I'm having trouble loading some libraries in CI. I've used CI a lot, so this problem seems real strange. I have several custom libraries in application/libraries (DB_helper.php, Calendar_helper.php, etc) which I load doing $this->load->library("DB_helper");

These classes are all pretty simple, and function a lot like models. For the most part, they don't extend anything and start with something basic like:

Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class DB_helper {

on every site I've made so far in CI (maybe 5-6) this hasn't caused any trouble, but now, through lots of cutting and pasting "echo"s in the Loader class, it seems like CI thinks I'm subclassing a core library, and then spits out an error when it can't find system/libraries/DB_helper.php. My class prefix is set to empty "" in the config files. Does anyone have any idea where I could start looking to squash this?

Thanks in advance!
#2

[eluser]Unknown[/eluser]
Actually, I found the problem. Sorry for the bother. I guess you're not supposed to set the subclass prefix to empty, since it thinks that everything is a subclass. Whoops!

Sorry again!




Theme © iAndrew 2016 - Forum software by © MyBB