<div id="send_info">
您好: <?php echo session(‘username‘) ; ?>
<a href="#" target="main-frame" class="fix-submenu">清除缓存</a>
<a href="<?php echo U(‘Login/logout‘); ?>" target="_top" class="fix-submenu">退出</a>
</div>
public function logout()
{
$model=D(‘admin‘);
$model->logout();
redirect(‘login‘);
}
//写在Adminmodel 里面
public function logout()
{
session(null);
}
时间: 2024-12-28 16:55:30