Welcome Guest, Not a member yet? Register   Sign In
Development of a own library
#1

[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";
        }
     }
}


Messages In This Thread
Development of a own library - by El Forum - 08-14-2007, 12:52 AM
Development of a own library - by El Forum - 08-14-2007, 01:52 AM
Development of a own library - by El Forum - 08-14-2007, 02:07 AM
Development of a own library - by El Forum - 08-14-2007, 05:01 AM
Development of a own library - by El Forum - 08-14-2007, 03:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB