|
PHP复制代码 <?php
class Admin extends controller
{
var $username = "";
function Admin()
{
parent::controller();
$this->load->helper("url");
$this->load->library("session");
$this->username = $this->session->userdata("username");
}
function index()
{
$this->load->view("admin/main");
}
//----------------------------------------------------
#头
function head()
{
checklogin($this->username);
$data["username"] = $this->username;
$this->load->view("admin/head",$data);
}
//-----------------------------------------------------
#左边菜单
function left()
{
$this->load->view("admin/left");
}
//-----------------------------------------------------
#退出登陆
function logout()
{
$this->session->sess_destroy();
echo "<script>window.top.location=".site_url("login").";</script>";
}
}
?> 复制代码
HTML 代码
HTML复制代码 <a href=<?=site_url("admin/logout")?>>退出 </a> 复制代码
HTML是三个frame里的一个,点"退出"时候,程序显示错误,怎么解决呀?
错误代码
HTML复制代码 A PHP Error was encounteredSeverity: Warning
Message: Cannot modify header information - headers already sent by (output started at D:\Apache2.2\htdocs\ci\system\application\helpers\checklogin_helper.php:8)
Filename: libraries/Session.php
Line Number: 315 复制代码
[ 本帖最后由 joyer 于 2008-6-27 20:33 编辑 ] |
|