title: Why I'm getting "cannot modify header information headers already sent by registration_model" error in codeigniter?
body: <p>I have a problem with model in my codeigniter app. I'm getting this error of sending headers information. Basically, codeigniter is complaining about my registration model sending header information before anything else. How is it possible? I thought that models are only for holding db queries methods and nothing more. Can someone please explain me that?</p>
  
  <p>This is how the beginning of a controller looks like:</p>
  
  <pre><code>function User()
  {
      parent::Controller();
      $this-&gt;view_data['base_url'] = base_url();
      $this-&gt;load-&gt;model('User_registration_model');       // don't forget capital, it's important
      $this-&gt;load-&gt;model('user_map_model');                // don't forget capital, it's important
      $this-&gt;load-&gt;model('Tribe_model');                   // don't forget capital, it's important
      $this-&gt;load-&gt;library('email');                       // Loading email library
      $this-&gt;load-&gt;library('session');                     // sets up the session
      $this-&gt;load-&gt;library ('form_validation');            // Loading form validation library
      $this-&gt;load-&gt;helper(array('form', 'url'));  
  }
  </code></pre>