因为需要使用sqlite数据库 找了资料写个配置文件,备忘哦
application/database.php
- return [
- 'type' => 'sqlite',
- //'hostname' => ROOT_PATH.'db/xmspace.db',
- 'database' => 'xmspace.net',
- 'username' => '',
- 'password' => '',
- 'hostport' => '',
- // 'dsn' => 'sqlite:'.ROOT_PATH.'db/xmspace.db',
- 'dsn' => 'sqlite:'.DS .'www'. DS .'tools'. DS .'xmspace'. DS.'data'. DS.'xmspace',
- 'params' => [],
- 'charset' => 'utf8',
- 'prefix' => 'xc_',
- 'debug' => true,
- 'deploy' => 0,
- 'rw_separate' => false,
- 'master_num' => 1,
- 'slave_no' => '',
- 'fields_strict' => true,
- 'resultset_type' => 'array',
- 'auto_timestamp' => false,
- 'sql_explain' => false,
- ];
复制代码 |