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
);


你可能感兴趣的:(codeigniter使用pdo的参考配置)