bleustreak12 Posted April 6, 2012 Share Posted April 6, 2012 I am getting this error when I use this header("Location: /"); to redirect to home page.I believe there is a javascript alert which come before this is called, that gives the below error, I cannot remove the alert so is there nay other way I can go about redirecting without giving me the below error ? A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/dsdsd/application/core/MY_Controller.php:dsdsds) Quote Link to comment https://forums.phpfreaks.com/topic/260464-error-cannot-modify-header-information-headers-already-sent/ Share on other sites More sharing options...
scootstah Posted April 6, 2012 Share Posted April 6, 2012 Are you using CodeIgniter? If so, you're doing something very wrong...you shouldn't have any output in that file. Quote Link to comment https://forums.phpfreaks.com/topic/260464-error-cannot-modify-header-information-headers-already-sent/#findComment-1335002 Share on other sites More sharing options...
Maq Posted April 6, 2012 Share Posted April 6, 2012 Have you read this sticky? http://www.phpfreaks.com/forums/index.php?topic=37442.0 Quote Link to comment https://forums.phpfreaks.com/topic/260464-error-cannot-modify-header-information-headers-already-sent/#findComment-1335031 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.