Welcome Guest, Not a member yet? Register   Sign In
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 !

Theme © iAndrew 2016 - Forum software by © MyBB