在PHP中怎么实现
点“退出” 跳转到登陆页面 并清除session
在PHP中怎么实现
点“退出” 跳转到登陆页面 并清除session
if ($_GET[action]=='out')
{
//清除所有SESSION
session_destroy();
//跳转
header("Location: 登录的页面URL");
}
if($op == 'logout') { //删除session if($_SGLOBAL['supe_uid']) { $_SGLOBAL['db']->query("DELETe FROM ".tname('session')." WHERe uid='$_SGLOBAL[supe_uid]'"); $_SGLOBAL['db']->query("DELETe FROM ".tname('adminsession')." WHERe uid='$_SGLOBAL[supe_uid]'");//管理平台 }
include_once S_ROOT.'./uc_client/client.php'; $ucsynlogout = uc_user_synlogout(); clearcookie(); ssetcookie('_refer', ''); showmessage('security_exit', 'index.php', 1, array($ucsynlogout));
}