Posted on 2007-01-19 11:29
oxl 阅读(474)
评论(0) 编辑 收藏 所属分类:
技术感语
修改php.ini文件:
[mbstring]
; language for internal character representation.
mbstring.language = Neutral
mbstring.strict_detection = On
default_charset = UTF-8
; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
mbstring.internal_encoding = UTF-8
; http input encoding.
mbstring.http_input = UTF-8
; http output encoding. mb_output_handler must be
; registered as output buffer to function
mbstring.http_output = UTF-8
; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
; portable libs/applications.
mbstring.encoding_translation = On
; automatic encoding detection order.
; auto means
mbstring.detect_order = UTF-8,ASCII
; substitute_character used when character cannot be converted
; one from another
mbstring.substitute_character = none;
; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 7
然后是修改my.ini:
[mysql]
default-character-set=utf8
[mysqld]
default-character-set=utf8
default-storage-engine=MyISAM
init_connect='SET NAMES utf8'