索引函数和普通函数中已发送的标头


headers already sent by in index function and normal function

public function index()
{
$data['home'] = $this->load->view('home', $data, true); // load view
}
public function register_user(){
$data['home'] = $this->load->view('home', $data, true); // load view
}

在我的主页中.php(查看(有一个链接可以单击主页/register_user,我收到一个错误标头已发送错误。我想我知道为什么,因为我的家庭控制器索引也加载视图。但是,如果我删除了索引的加载视图,那么我的主页就会损坏,因为未注册的用户将首先登陆。

删除已使用 发送的标头

void header_remove ([ string $name ] )

http://in3.php.net/header_remove