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
Does https prevent csrf?
How to define a user function?
How many keywords are there in php?
Why post method is used in php?
Tell me what is the difference between get and post?
How to strip whitespace (or other characters) from the beginning and end of a string?
What is composer phar?
Explain me is it possible to destroy a cookie?
Do you know what is the differences between $a != $B and $a !== $B?
Write a program in php to find the occurrence of a word in a string?
What is die in php?
Give the case where we can use get and we can use post methods?
Can you define an array argument as a reference type?
Which function would you use to format date information in php?
Is php a backend?