CodeIgniter Forums
Loading custom libraries - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Loading custom libraries (/showthread.php?tid=6860)



Loading custom libraries - El Forum - 03-14-2008

[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!


Loading custom libraries - El Forum - 03-14-2008

[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!