[eluser]the real rlee[/eluser]
Hi, this may be a silly question but is it possible to use the URI library in a pre_controller hook? I'm getting errors telling me the object doesnt exist, but the User Docs indicate that the URI class is pre-loaded with CI and pre_controller hooks are after everything CI is loaded... Am I missing something here? Appreciate any help
Code:
$hook['pre_controller'] = array('class'=>'History', 'function'=>'update', 'filename'=>'History.php', 'filepath'=>'hooks', 'params'=>array());
And my hook:
Code:
class History {
var $CI;
function History(){
$this->CI =& get_instance();
}
function update(){
die($this->CI->uri->uri_string());
$this->CI->session->set_userdata(array('location'=>$this->CI->uri->uri_string()));
}
}