最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
PHP未登录自动跳转到登录页面如何实现
时间:2022-06-24 16:38:46 编辑:袖梨 来源:一聚教程网
下面一段代码给大家分享php未登录自动跳转到登录页面,具体代码如下所示:
namespaceHomeController; useThinkController; classBaseControllerextendsController{ //基础信息,判断登陆 publicfunction__construct(){ parent::__construct(); /*if(!session('?user')){ redirect(U('Home/Login/index')); }*/ } } ?> |
