zyra Posted April 14, 2012 Posted April 14, 2012 I keep getting a weird error like this:Warning: Cannot modify header information - headers already sent by (output started at /home/zyra/public_html/head.php:13) in /home/zyra/public_html/loginact.php on line 20 I think it has something to do with some cookies I'm working with. Any insight?
Kyougi Posted April 14, 2012 Posted April 14, 2012 There are a few things that could cause this, such as misplaced white space somewhere (like at the beginning or end of the file) or any html before any headers are sent. You can enable output buffering to get rid of the error:Place this at the beginning of your page: <? ob_start(); ?> and this at the end of your page: <? ob_flush(); ?> 1
Byron Posted April 14, 2012 Posted April 14, 2012 Header information (cookies, redirect headers, headers) have to be sent before any html output. In other words, your cookies go at the top before any html output.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now