'dsn' => "mysql:host={$config['hostname']};dbname={$config['database']};charset=utf8",
'hostname' => $config['hostname'],
'username' => $config['username'],
'password' => $config['password'],
'database' => $config['database'],
'dbdriver' => 'pdo',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
大家好,这是我的连线档设定方式,但不知道为什么写进中文时会变乱码
如果 dbdriver 改成 mysqli 就会正常写入,不知道还有哪边要变动