Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which methods should be used for sending an email using the variables $to, $subject, and $body?

1042


Is php procedural or oop?

928


What are the features and advantages of object-oriented programming in php?

879


Which function gives us the number of affected entries by a query?

878


What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?

994


What type of errors can be occurred in php?

933


How to assigning a new character in a string using php?

1087


What does the expression exception::__tostring means?

958


What is difference between post and put in rest?

952


What is php and why it is used?

994


How do you identify independent and dependent variables in regression analysis?

888


What is mysql_fetch_row?

994


How does php isset work?

887


What is Apache's configuration file typically called?

1054


Tell me what are the encryption techniques in php?

880