header function

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
ranjitbd
Forum Newbie
Posts: 24
Joined: Sun May 03, 2009 1:59 pm

header function

Post by ranjitbd »

i want to use some echo statements before using header function
so what to do
thnx in advance
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: header function

Post by JAB Creations »

Then just do it; it can be useful for debugging.

Keep in mind whenever there is any client output before PHP sends out headers then the headers will not be sent.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: header function

Post by Darhazer »

you can use output buffering, but better just do not echo anything before the headers
Or if you need it for debugging, you can log to a file.
Post Reply