diff --git a/application/controllers/User.php b/application/controllers/User.php index 8fee6a0..598ac91 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -68,9 +68,9 @@ } } public function logout(){ - echo '您已退出,将在5s后返回首页!'; + echo '您已退出,将在3s后返回首页!'; $this->clean_cookies(); - header("Refresh:5;url=/"); + header("Refresh:3;url=/"); exit; } //清除COOKIE diff --git a/application/libraries/Basic.php b/application/libraries/Basic.php index 040861a..6ba1b68 100644 --- a/application/libraries/Basic.php +++ b/application/libraries/Basic.php @@ -51,7 +51,10 @@ return false; } else{ - echo '权限不足!'; + echo "权限不足,请重新登录 。"; + //清除cookies + setcookie("user", '', time()-3600,"/"); + setcookie("token", '', time()-3600,"/"); exit; } } @@ -71,7 +74,7 @@ curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"); //伪造reffer - curl_setopt ($ch, CURLOPT_REFERER, $url); + curl_setopt ($curl, CURLOPT_REFERER, $url); curl_setopt($curl, CURLOPT_FAILONERROR, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); @@ -81,6 +84,7 @@ curl_setopt($curl , CURLOPT_TIMEOUT, 60); $html = curl_exec($curl); + curl_close($curl); //返回数据 return $html; diff --git a/application/views/user/multiple.php b/application/views/user/multiple.php index 2009897..e423711 100644 --- a/application/views/user/multiple.php +++ b/application/views/user/multiple.php @@ -49,58 +49,4 @@ - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/application/views/user/page.php b/application/views/user/page.php index 2dd63cb..849f657 100644 --- a/application/views/user/page.php +++ b/application/views/user/page.php @@ -6,7 +6,12 @@
+