[eluser]whizzer[/eluser]
I have enabled the hooks in my config file. Here is the contents of config/hooks:
Code:
$hook['pre_controller'] = array(
'class' => 'Pre_Checks',
'function' => 'subdomain_check',
'filename' => 'pre_checks.php',
'filepath' => 'hooks'
);
I this is what I have in hooks/pre_checks.php:
Code:
class Pre_Checks {
function subdomain_check()
{
//get the instance of the CI superobject
$CI =& get_instance();
var_dump($CI);
}
}
I get "NULL" and I can't use the methods and properties of my CI superobject (I also tried $this->CI =& get_instance() but it doesn't word either).
Thank you.