Warning: Cannot modify header information - headers already sent by (output started at /home/********/public_html/***********.php:30) in /home/******/public_html/********** on line 119
trouble with header()
Moderator: General Moderators
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
trouble with header()
I get this error when I am trying to use header.
Last edited by anthony88guy on Thu May 12, 2005 6:01 pm, edited 3 times in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Bennettman
- Forum Contributor
- Posts: 130
- Joined: Sat Jun 15, 2002 3:58 pm
You've already output HTML data. You should buffer it in some way (for example, output buffering controls), or do something else to ensure that no output is sent to the browser before the header is sent.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
That is a bandaid approach to the problem. Better yet, design your app's properly so that all your output is sent at the end of your program execution.Bennettman wrote:...You should buffer it in some way (for example, [url=http://uk.php.net/manual/en/function.ob-start.php]output buffering controls...[/url
-
Bennettman
- Forum Contributor
- Posts: 130
- Joined: Sat Jun 15, 2002 3:58 pm
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
-
Bennettman
- Forum Contributor
- Posts: 130
- Joined: Sat Jun 15, 2002 3:58 pm
A bandaid approach is one where you apply quick fixes which don't make the code itself more effective, but do the job. Like putting on a bandaid/plaster when something goes wrong instead of stopping the problem from happening in the first place (or going to the trouble of preventing it happening again if it does).
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
I feel dumb, it works now.Bennettman wrote:A bandaid approach is one where you apply quick fixes which don't make the code itself more effective, but do the job. Like putting on a bandaid/plaster when something goes wrong instead of stopping the problem from happening in the first place (or going to the trouble of preventing it happening again if it does).