Phpsession_start for help !! Warning: session_start () [function. session-start]: Cannotsendsessioncachelimiter-headersalreadysent (outputstartedatC: AppServwwwreghomepag php session_start
Help !!
Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at C: \ AppServ \ www \ reg \ homepage. php: 5) in C: \ AppServ \ www \ reg \ homepage. php on line 676
I checked on the Internet, but the solution is to change system files and so on. in my previous c ++ experience, it is generally useless, and it really does not work. Therefore, O (∩ _ ∩) O ~ What should we do? Thank you so much...
------ Solution --------------------
Why not. Try this way:
PHP code
'; If (isset ($ _ SESSION ['username']) {echo $ _ SESSION ['username'], "welcome! "; Echo 'logout ';} else {echo 'login';} echo'';?>