ci utf8 文件问题
if (preg_match('/./u', 'é') === 1 // PCRE must support UTF-8
AND function_exists('iconv') // iconv must be installed
AND ini_get('mbstring.func_overload') != 1 // Multibyte string function overloading cannot be enabled
AND $CFG->item('charset') == 'UTF-8' // Application charset must be UTF-8
)
为何要做这个判断呢 ini_get('mbstring.func_overload')string.func_overload=1是重载mail函数啊
string.func_overload=1是重载mail函数啊? 我想问一下,为什么我用了UTF-8,数据库连接出错的中文提示会是乱码呢? jeongee 发表于 2011-9-2 11:28 static/image/common/back.gif
string.func_overload=1是重载mail函数啊?
上边的那段代码来自 core/utf8.php好像是用来判断当前环境是否支持utf-8 ,为何要用ini_get('mbstring.func_overload') != 1来判断是否支持utf-8呢?
配置文件中对mbstring.func_overload说明:
; 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 = 0
smartweb 发表于 2011-9-2 11:32 static/image/common/back.gif
我想问一下,为什么我用了UTF-8,数据库连接出错的中文提示会是乱码呢?
数据库连接错误有中文提示吗? 还是你自定义的? xiaohua1054 发表于 2011-9-2 11:57 static/image/common/back.gif
数据库连接错误有中文提示吗? 还是你自定义的?
直接用中文语言库的。
页:
[1]