Trouble extending Loader library |
[eluser]mrtopher[/eluser]
I'm trying to add a function or 2 to the default CI loader library and am using the process described in the users guide: http://ellislab.com/codeigniter/user-gui...aries.html. But, when I try to access my function I get a "Call to undefined function" error. I replaced my code with a simple test as shown below and still get the error: Code: class MY_Loader extends CI_Loader When I call Code: $this->load->hi_mom(); I get "PHP Fatal error: Call to undefined function: hi_mom() in...". I've confirmed that the MY_Loader file is being used by CI but for some reason it's not picking up my function. Any ideas?
[eluser]mrtopher[/eluser]
Anyone have any ideas why this wouldn't be working? I'm not having much luck.
[eluser]m4rw3r[/eluser]
Is it PHP 4? If that is the case, you have to modify system/codeigniter/base4.php so CI_base extends MY_Loader instead of CI_loader.
[eluser]gwelter[/eluser]
Not sure if you ever got this resolved, but I ran into the same problem. It turns out the filename is case sensitive so in your application/libraries folder it should say MY_Loader.php exactly. That did the trick for me! -Gus |
Welcome Guest, Not a member yet? Register Sign In |