• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AutoLoad: can not load 3 library

auto load config:
$autoload['libraries'] = array('pagecontent', 'database', 'checkpermission');

class MyClass extends Controller{
  function MyClass() {
    parent:: Controller();
  function myfunc() {
    $param = '1|1|1|1';
I call $this->checkpermission in class Myclass
Unknow MyClass::$checkpermission

Plz help!

[eluser]Michael Wales[/eluser]
I would make sure the library is actually being loaded (no syntax errors, etc). CodeIgniter has no problem autoloading 3 libraries (or 12, or 50, etc).

Hello Nhat Lea welcome to the CI forums!

What I would do is var_dump($this->checkpermissions) to see the information. This should let you check on your functions availability among other things. If it comes back NULL then the library is not being loaded. As Michael said, it sounds as if the library is not being loaded. Would you mind posting the code for Checkpermission.php? Then perhaps we might be able to help further.

Hmmmm, I'm sry!
checkpermissions class is put in ROOT-libraries but i don't name it CI_checkpermissions or MY_checkpermission.
This is fixed !

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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