[eluser]mb2007[/eluser]
Hello,
I want to develop a own library and have some trouble. I put my library in the folder /aplication/libraries and I add my library to the autoload array. But when I call my library in a controller I get a Warning headers already sent. Why?
My Library:
Code:
class mbauthentification
{
function mbauthentification()
{
log_message('debug', "Authentification Class Initialized");
$this->CI=& get_instance();
$this->CI->load->library('session');
$this->CI->load->helper('form');
$this->CI->load->helper('url');
}
function login()
{
$email = $_POST['email'];
$this->CI->session->set_userdata('email', $email);
return true;
}
}
The Controller:
Code:
class User extends Controller {
function User()
{
parent::Controller();
}
function login()
{
if($this->mbauthentification->login())
{
echo "TEST";
}
}
}