$ _ Session why I saved garbled characters in ie, but ff and chrome are normal. I posted a post for help a few days ago, but it was fruitless. (The problem is that ie is not displayed, and ff and chrome are normal) I tried to echo $ _ SESSION [& quot; goodsid & quot;] and found that the session in ff is yuan 002 $ _ session. Why are Chinese characters garbled in ie? ff and chrome are normal?
I posted a post for help a few days ago, but it was fruitless. (The problem is that ie cannot be displayed, and ff and chrome are normal)
Echo $ _ SESSION ["goodsid"],
Found
The session displayed in ff is yuan 002 @ yuan 003 @ yuan 004 @ the Chinese character is displayed normally,
In ie, the display session is? 002 @? 003 @? 004 @, the Chinese character in front of the number is displayed as a box.
It must have been a problem with the Chinese character storage in the session,
All my files are saved in UTF-8 format,
The session file is
PHP code
session_start();header ( "Content-type: text/html; charset=utf-8" );if($_SESSION["goodsid"]==""){ $_SESSION["goodsid"]=$_GET["id"]."@";}else{ $array=explode("@",$_SESSION["goodsid"]); if(in_array($_GET["id"],$array)){ $key=array_search($_GET["id"],$array); $array[$key]=""; $_SESSION["goodsid"]=implode("@",$array); }else{ $_SESSION["goodsid"].=$_GET["id"]."@"; }}
What's wrong with me ???
------ Solution --------------------
The browser encoding format is set manually, rather than the automatic selection?