Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14115

Cannot modify header information - headers already sent

$
0
0
Hi! I'm using CodeIgniter for quite awhile now..and I'm currently facing an error



Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /project/system/core/Exceptions.php:271)

Filename: helpers/url_helper.php

Line Number: 564

Backtrace:

File: /project/application/core/MY_Controller.php
Line: 75
Function: redirect

File: /project/application/controllers/User.php
Line: 116
Function: user_view



This is Line 75 of My_Controller

PHP Code:
if( ! $this->session->email || $this->session->email == NULL || $this->session->isLoggedIn !== TRUE) {
     $this->session->sess_destroy();
     redirect(site_url('login'));
}
  

just incase this is needed, I used echo in my User controller because this is where I get some ajax request.

Thank you very much Smile

Viewing all articles
Browse latest Browse all 14115


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>