protected function isLogin()
{
if(empty(USER_ID))
{
$this->error('User Not logged in, please log in',url('user/login'));
}
}
爱做梦的年纪2017-09-09 07:45:42
This is obviously not a variable. PHP loves $. You need to add $ to the variable. You need to assign a value to this variable. For example, $user_id = $_SESSION['USER_ID'].
if(empty(USER_ID)) { $this->error('用户未登录,请登录',url('user/login')); }
I suggest you watch some introductory video tutorials. With some source code courseware, the improvement will be even greater: http://www.sucaihuo.com/video/143-0-0
按键盘手指磨破皮2017-09-08 23:52:12
You don’t send out the error message. You only have to guess when writing half of the code. What is USER_ID? Did you write it wrong? It's a variable and you didn't add $. Judging from your login, it should be a session, right? To write $_SESSION['USER_ID'];