when you will get the message/error "headers already sent"?

Answer Posted / suren

if u print any message on the browser using echo statement
or any html tags before using the "session_start()" like
statements in the scripts.
if u want to overcome that problem
simply write "ob_start();" at the very starting of script
and "ob_end_flush();" at the end.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why php is sometimes called as embedded scripting language?

482


What is the difference between session_unregister() and session_unset()?

571


Can I use node js with php?

527


What are magic methods?

546


What is the function func_num_args() used for?

526






Does php have multiple inheritance?

500


How to get number of elements in an array?

527


Does php support function overloading?

561


How you can update memcached when you make changes to php?

614


Can a super () and this () keywords be in same constructor?

483


What are the differences between echo and print?

558


What is get and post method in php?

521


Explain mysql_errno()?

548


When is a conditional statement ended with endif?

503


How to send a cookie to the browser?

534