Home > Net >  Codeigniter 3 How to load library session from library path
Codeigniter 3 How to load library session from library path

Time:03-07

i try to load library session from another file in library path, i use these code to load the library but its cannot work

class Gdrive_api
{
    public function __construct()
    {
    $this->load->library('session');
    }
}

Message Show

Undefined property ::$load

CodePudding user response:

Finally i found the way to call another library from library path, it using get instance

public function __construct()
{
    $this->ci = &get_instance();
    $this->ci->load->library("session");
}
  • Related