|
hooks/testhook.php
代码如下
class testhook
{
function display()
{
$CI=& get_instance();
$CI->load->library('session');
if($CI->session->userdata('logged_in') AND $CI->session->userdata('user_id') AND $CI->session->userdata('email')){
return true;
}else{
redirect('/business/login');
}
}
}
报错提示:Fatal error: Call to a member function library() on a non-object in D:\AppServ\www\apply\application\hooks\testhook.php on line 9
使用$CI=&get_instance();也不可以加载吗?
有那位有经验的帮助一下 ,谢谢了...
|
|