配置.php
$config['charset'] = 'UTF8';
数据库.php
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
html 标题
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
我的数据库具有 utf8_general_ci 排序规则,即使我无法在页面上显示我的 unicode 字符,我的所有文件都以 utf8 编码
始终显示 वि.सं。 सतलमत सत¤¤ त¤ª सत¤²à¤®à¤¤
最佳答案
你需要确保到处都有utf8,比如 在config.php
$config['charset'] = "UTF-8"; //not UTF8
在 php.ini
default_charset = "utf-8"
用于数据库
DEFAULT CHARSET=utf8;
关于php - 在 Codeigniter 上显示 UTF8 字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16828197/