classdefine.php content:
<?php
class classtemp{
public function printtemp(){
$temp="中文字符";
echo $temp;
}
}
?>work.php content(页面使用的是utf8字符集):
<?php
$temp=new classtemp;
$temp->printtemp();
?>
运行ie之后显示乱码。
<?php
class classtemp{
public function printtemp(){
$temp="中文字符";
echo $temp;
}
}
?>work.php content(页面使用的是utf8字符集):
<?php
$temp=new classtemp;
$temp->printtemp();
?>
运行ie之后显示乱码。
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
class $temp{
public function __construct(){
$temp=iconv("GBK","UTF-8","中文字符");
}
?>
是这样吗?