php - superobject not loaded in hook at codeigniter -


when load hook in codeigniter, hook load superobject not.

public function __construct() {     $this->ci =& get_instance();     // gives me nothing     print_r($this->ci);     // works fine     echo "hello!";  }  

codeigniter version :3.1.0

any idea?

you should use post_controller_constructor or post_controller , instead of pre_controller or pre_system.

check docs.

no routing or other processes have happened @ point.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -