$connection = new CDbConnection('mysql:host=localhost;dbname=control', 'root', '123456');
#不好使
//$connection = new CDbConnection('mysql:host=localhost;charset=utf8;dbname=control', 'root', '123456');
$connection->active = true;
#下面这句不好使,改了全局的framework/db/CDbConnection.php
#$connection->charset = 'utf8';
最终修改framework/db/CDbConnection.php下的
public $charset='utf8';
ok了
阅读(907) | 评论(0) | 转发(0) |