$_session为啥ie中保存汉字乱码,ff,chrome却都正常

WBOY
Release: 2016-06-13 13:08:02
Original
1082 people have browsed it

$_session为什么ie中保存汉字乱码,ff,chrome却都正常
前几天发了帖子求助,无果,(问题是ie下图片显示不了,ff和chrome下正常)
自己试着echo $_SESSION["goodsid"],
发现
ff下显示session为 袁002@袁003@袁004@ 汉字显示正常,
ie下显示session为?002@?003@?004@, 数字前面的汉字显示成了框框.
肯定是session中汉字存储出了问题,
我的文件都存成了utf-8格式,
session文件为

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
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"]."@";
        }
}


Copy after login

请问,我哪里出了问题呢???

------解决方案--------------------

人为设定了浏览器编码格式,而非 自动选择?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!