$ _ Session: Why is Chinese characters garbled in ie? ff and chrome are normal.

Source: Internet
Author: User
$ _ 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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.