when you will get the message/error "headers already sent"?
Answer Posted / dhiraj
when we are using the session variable..and want to start
our session.. we use session_start(); in the very first
line.
anything occur before this line, even a single space we get
the headers already sent error.
To overcome this problem, we can use ob_start(); at the
very first line and ob_end_flush(); at the end of the
script..
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Which methods should be used for sending an email using the variables $to, $subject, and $body?
Is php procedural or oop?
What are the features and advantages of object-oriented programming in php?
Which function gives us the number of affected entries by a query?
What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?
What type of errors can be occurred in php?
How to assigning a new character in a string using php?
What does the expression exception::__tostring means?
What is difference between post and put in rest?
What is php and why it is used?
How do you identify independent and dependent variables in regression analysis?
What is mysql_fetch_row?
How does php isset work?
What is Apache's configuration file typically called?
Tell me what are the encryption techniques in php?