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
What is the meaning of php?
How to declare an array in php?
How to calculate the difference between two dates using php?
What is exception handling in php?
What is the difference between explode and split?
What is the static variable in function useful for?
Is php easier than javascript?
Is python similar to php?
What is a php trait?
How to display your correct URL of the current web page?
Write down the benefits of php7?
Which cryptographic extension provide generation and verification of digital signatures?
What is boolean in php?
Tell me are parent constructors called implicitly inside a class constructor?
I am writing an application in php that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with php?