codeigniter使用pdo的參考配置

$db['default'] = array(
  'dsn'  => 'mysql:host=127.0.0.1;port=3306;dbname=test',//關鍵是這個得配置
  'hostname' => '',
  'username' => 'username',
  'password' => 'password',
  'database' => 'test',
  'dbdriver' => 'pdo',
  'dbprefix' => '',
  'pconnect' => FALSE,
  'db_debug' => TRUE,
  'cache_on' => TRUE,
  'cachedir' => '',
  'char_set' => 'utf8',
  'dbcollat' => 'utf8_general_ci',
  'swap_pre' => '',
  'encrypt' => FALSE,
  'compress' => TRUE,
  'stricton' => FALSE,
  'failover' => array(),
  'save_queries' => TRUE
);
相關文章
相關標籤/搜索