21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
session_start();
//$_SESSION['gid'] 是用户登录成功时注册的变量,值1代表管理员组
if (!isset($_SESSION['gid']) || ($_SESSION['gid'] != 1)) {
header("location:login.php?".SID);
}
//do some thing here
?>
<?php
header("Location: http://www.example.com/"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>