[1.6.1]增加对Sqlite3的支持
测试环境:ClodeIgniter1.6.1
SQLite3
配置方法:
1、由于SQLite3是要由PDO驱动的,所以,第一件是就是增加PDO的数据驱动。把附件下载下来放到 system\database\drivers 目录里
最终是这样:
system\database\drivers\pdo\pdo_driver.php
system\database\drivers\pdo\pdo_result.php
2、配置system\application\config\database.php文件,具体如下
$active_group = "default";
$active_record = TRUE;
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "";
$db['default']['password'] = "";
$db['default']['database'] = "sqlite:./database/mydata.db3";
$db['default']['dbdriver'] = "pdo";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
OK,配置完成,就这么简单。
页:
[1]