PHP garbled after removing BOM header
The program is written in the notepad++ text editor, and when the format is selected, and encoded in UTF-8 format, the Chinese characters (read from the database, stored in the $_session) are displayed normally, but the following warning appears
Warning:session_start () [Function.session-start]: Cannot send session cache Limiter-headers already sent (output Starte D at E:\wamp\www\biyesheji\login_check.php:1) in E:\wamp\www\biyesheji\login_check.php on line 1
Warning:cannot Modify header Information-headers already sent by (output started at E:\WAMP\WWW\BIYESHEJI\LOGIN_CHECK.P hp:1) in E:\wamp\www\biyesheji\login_check.php
Array ([username] = Zhang San [userid] = 2009011105 [role] + 3)
Login Successful!
Jump after 5 seconds
When the BOM header is removed, the warning disappears, but the Chinese characters all become garbled
Array ([username] = Liao incrementally 笁 [UserID] = 2009011105 [Role] = 3)
BNHI 綍 Contact radiation functions!
5 crepe 掗 clothed Å for configures Aachen accommodating vexed Qi
Find a way to solve
------Solution--------------------
Header (' content-type:text/html; Charset=utf-8 ');
Add a statement is UTF-8 code, otherwise the browser may be detected by itself