Welcome Guest, Not a member yet? Register   Sign In
Including functions
#4

[eluser]jwag[/eluser]
Ok, now how do I get the new one I created to load.

I named mine Basecontroller.

(NOTE: I set the prefix from MY_ to LIB_ on system/application/config/config.php)

In system/application/libraries/LIB_Basecontroller, I have my class, which starts with...

Code:
class Basecontroller extends Controller {
   ...
}

Then, in system/application/controllers/admin/admin.php, I put...
Code:
class Admin extends BaseController {
   ...
}

I edited system/application/config/autoload.php and tried to add the library as both LIB_Basecontroller, Basecontroller, LIB_basecontroller, basecontroller, etc., and all give me the error message:

Fatal error: Class 'Basecontroller' not found in /home/leaf/webdocs/system/application/controllers/admin/admin.php on line 3

What exactly do I need to put, and where, to load the Basecontroller?

Thanks again for any help/direction.


Messages In This Thread
Including functions - by El Forum - 03-10-2009, 05:32 PM
Including functions - by El Forum - 03-10-2009, 06:47 PM
Including functions - by El Forum - 03-10-2009, 10:31 PM
Including functions - by El Forum - 03-11-2009, 12:35 PM
Including functions - by El Forum - 03-11-2009, 12:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB