• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BUG - autoloading user-created libraries

#1
Hello all,

found an error with autoloading custom libraries, getting next error:

Fatal error: Class 'CI_Layout' not found in ...\system\core\Common.php on line 196

my class name is Layout

I explored this file, and found out it adds CI_ automatically to class name.

but if I change class name to CI_Layout, it tells me

"Non-existent class: Rb"
Reply

#2
If it is your own library then it goes in ./application/libraries.
If it is a library that extends a CI library then it goes in ./application/core.

You never place your code in the CI system folder!
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
as InsiteFX said user created libraries go in : application/libraries

to auto load the library open: application/config/autoload.php

add the library name to the autoload['libraries'] array. EG: autoload['libraries'] = array('my_lib');

this is all covered in the documentation.
"I reject your reality and substitute my own" - Adam Savage, M5 Inc.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.