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

What is the difference between the functions strstr() and stristr()?

550


How do I clear my browser session?

522


What is php key?

519


What is the difference between md5(), crc32() and sha1() crypto on php?

623


can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????

1329






How can I load data from a text file into a table?

574


What are the advantages of indexes?

512


Is php fully object oriented?

495


What is the use of nl2br() in php?

583


What is the purpose of php?

550


What exactly is validating and sanitizing?

625


How can you compare objects in php?

515


How can you execute php script from the command line?

549


What is php trait?

530


Tell me what are the different types of errors in php?

519