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
Is server side a session?
Can php run without server?
What is php7?
What is an operator in php?
What are php strings?
What are the ways to include file in php?
What are the different opening and closing tags available in PHP?
How to generate a character from an ascii value?
What is new static in php?
What is super () python?
Explain about looping in PHP?
How big is varchar max?
Tell me what are the __construct() and __destruct() methods in a php class?
How to call php function from javascript using ajax?
What are the 3 scope levels available in php and how would you define them?