2016-10-13 00:16:48 点击量:9 标签: 收藏本文
[PHP]session判断登录状况
- .session_start();
- .isset(
- .SESSION['username'])?include("checklogin.php"):session_destroy();
- .?>
- .欢迎页面,说明已经登录进来
- .<?php
- .if (isset(GET['out'])){
- .GET['out']=='index'?session_destroy():'';
- .}
- .?>
- .<a href='?out=index'>退出</a>
- .checklogin.php页面是<?php
- .//session_start();
- if (empty(SESSION['username'])){
- echo 'CuPlayer.comjs提示'; session_destroy();