[eluser]new developer[/eluser]
I have a problem saying session headers already sent. I worked the same code on Wamp but i installed Xampp recently. It gives me an error. My code is really simple as below. Can anyone please help me rectify this.
Code:
<?php
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index(){
$data['main'] = 'adminLogin';
$data['title']= 'Welcome to my first aplication';
$this->load->vars($data);
$this->load->view(dashboard);
}
[eluser]jwindhorst[/eluser]
I don't know if this is still relevant, but I was having a similar problem for a while this morning. My issue was a blank link under my closing php tag at the end of my user_model.php file. For some reason that blank line got rendered as display data and those the headers were thrown.
[eluser]danielnexterous[/eluser]
I would go with jwindhorst.
I don't see anything else where you are sending any data to the browser that would cause the error.
Make sure there's no white space anywhere after the PHP closing or opening tags.
[eluser]simshaun[/eluser]
That's why I follow CodeIgniter's footsteps and don't use a closing ?> tag in my controllers, libraries, models, hooks, etc..
The only place I use the closing tag is in my views (if my views contain php).