class CommonController extends ExtendController{ public function __init(){ //如果没有登录,去登陆界面 if(!isset($_SESSION['username']) || !isset($_SESSION['uid'])){ go(U('Member/Login/index')); } } }
class CommonController extends ExtendController{ public function __init(){ //如果没有登录,去登陆界面 if(!isset($_SESSION['username']) || !isset($_SESSION['uid'])){ go(U('Member/Login/index')); } } }
转载于:https://www.cnblogs.com/gleeee/p/4781437.html