After a session is used for many times, the following prompt is displayed,
Warning: session_start () [function. session-start]: Cannot send session cookie-headers already sent by (output started at/home/u114264/include/db_mysql tutorial. class. php Tutorial: 1) in/home/u114264/login1.php on line 3
Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at/home/u114264/include/db_mysql.class.php: 1) in/home/u114264/login1.php on line 3
The biggest possible cause of the analysis is that there is a character output including spaces before session_start (), as long as it is processed,
There is another way to add @ session_start () to session_start. Not recommended
Address solution.
The most common solution. Enable output_buffering = 4096; Global attribute.
Solution 2.
Ob_start: Open the output buffer.
Function Format: void ob_start (void)
Note: When the buffer zone is activated, all non-file header information from the PHP program is not sent, but stored in the internal buffer zone. To output the buffer content, you can use ob_end_flush () or flush () to output the buffer content.
Note:
If you use UTF-8 encoding, be sure to remove the BOM in the UTF-8, this is because the UTF-8 encoding file contains the bom, and php4, 5 are not supported bom. Remove bom and use Notepad ++ to open the conversion.