大家来看看吧

王朝厨房·作者佚名  2007-01-05
宽屏版  字体: |||超大  

我配置了好几在了,一直没有解决这个问题

httpd.conf如下:

AddDefaultCharset GB2312

#

# Commonly used filename extensions to character sets. You probably

# want to avoid clashes with the language extensions, unless you

# are good at carefully testing your setup after each change.

# See http://www.iana.org/assignments/character-sets for the

# official list of charset names and their respective RFCs.

#

AddCharset ISO-8859-1 .iso8859-1 .latin1

AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen

AddCharset ISO-8859-3 .iso8859-3 .latin3

AddCharset ISO-8859-4 .iso8859-4 .latin4

AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru

AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb

AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk

AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb

AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk

AddCharset ISO-2022-JP .iso2022-jp .jis

AddCharset ISO-2022-KR .iso2022-kr .kis

AddCharset ISO-2022-CN .iso2022-cn .cis

AddCharset Big5 .Big5 .big5

# For russian, more than one charset is used (depends on client, mostly):

AddCharset WINDOWS-1251 .cp-1251 .win-1251

AddCharset CP866 .cp866

AddCharset KOI8-r .koi8-r .koi8-ru

AddCharset KOI8-ru .koi8-uk .ua

AddCharset ISO-10646-UCS-2 .ucs2

AddCharset ISO-10646-UCS-4 .ucs4

AddCharset UTF-8 .utf8

php.ini文件如下 :

; PHP's built-in default is text/html

;default_mimetype = "text/html"

default_charset = "gb2312"

php文件如下:

<html>

<head>

<meta http-equiv="content-language" content="zh-CN">

<meta http-equiv="content-type" content="text/html; charset=gb2312">

<title>timedata</title>

</head>

<body>

<?

$current_time=getdate(time());

printf("%dYear %dMonth %dDay %dHours %dMinutes %dSeconds",date("Y"),date("m"),date("d"),$current_time["hours"],$current_time["minutes"],$current_time["seconds"]);

?>

<p>

chineses中文

<body>

执行结果如下:

2004Year 1Month 2Day 13Hours 44Minutes 39Seconds

chineses涓枃

【发表回复】【查看CU论坛原帖】【添加到收藏夹】【关闭】

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有