Thinkphp5.0.24 连接sqlite配置文件
因为需要使用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,
];
页:
[1]