add header information

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamal
Forum Commoner
Posts: 57
Joined: Sat Oct 26, 2002 7:53 pm
Location: London

add header information

Post by jamal »

Hi Guys,
Please I wondered if you can help me with this problem. Everytime I tried to run a code this is the error message I got.


Warning: Cannot add header information - headers already sent by (output started at /home/phpfreak.com/public_html/includes/popunder.php:21) in /home/phpfreak.com/public_html/quickcode.php on line 257

Warning: Cannot add header information - headers already sent by (output started at /home/phpfreak.com/public_html/includes/popunder.php:21) in /home/phpfreak.com/public_html/quickcode.php on line 258

What is the cause of this error. How can I solve it or avoid it from happening. Please give me a little tutorial to eat on this problem .
God Bless You Guys
Thanks
Rob the R
Forum Contributor
Posts: 128
Joined: Wed Nov 06, 2002 2:25 pm
Location: Houston

Post by Rob the R »

If you haven't already, you should look at the sticky topic in this forum:
http://www.devnetwork.net/forums/viewtopic.php?t=1157
It addresses most of the header problems.

If you have looked at the topic and it does not apply to your problem, post some of your troublesome code, and I'm sure someone here will be able to help.
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

problem

Post by AVATAr »

The problems is you echoed something before you send the headers
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Add "ob_start();" just after "<?php" and add "ob_end_flush();" at the end.
Post Reply