Session_start (); error message: test. php file content & lt ;? Phpinclude (site_test.php );? & Gt; site_test.php file content & lt ;? Phpsession_start (); header (Content-Type: & nbsp; texthtml; & nbsp; charsetutf-8 );? & Gt; session_start (); error message
Test. php file content
Include ('site _ test. php ');
?>
Site_test.php file content
Session_start ();
Header ('content-Type: text/html; charset = utf-8 ');
?>
When test. php is opened, the following error is reported, which is hard to understand after a long time. why?
Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at/home/cybertry/public_html/logs) in/home/cybertry/public_html/idearforyou.com/site_test.php on line 2
Warning: Cannot modify header information-headers already sent by (output started at/home/cybertry/public_html/logs) in/home/cybertry/public_html/idearforyou.com/site_test.php on line 3
------ Solution --------------------
Session_start (); no output in front
------ Solution --------------------
What is site_test.php encoding? if it is UTF-8 encoding, check that there is no bom header.