-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
そらヽ(・ω・ゞ) edited this page Sep 17, 2017
·
22 revisions
The project configuration needs to be passed in the entry file.
require __DIR__ . '/../vendor/autoload.php';
$config['app_debug'] = true; // debug mode
$config['app_name'] = 'app'; // application name
$config['app_name'] = array(
'1.kotori.php' => 'module1',
'2.kotori.php' => 'module2'
); // or multi-domain mode
$app = new \Kotori\App($config);
$app->run();
You can use $this->config->get(YOUR_CONFIG_KEY)
to read the configuration in the controller, model, and view.
key | description | default value |
---|---|---|
app_debug | Debug mode | true |
app_name | Application name | 'app' |
db | Databases | NULL |
url_mode | URL Mode | 'query_string' |
time_zone | Time Zone | 'Asia/Shanghai' |
error_tpl | Error Template | NULL |
url_route | Routes | NULL |
cache | Cache driver | ['adapter' => 'dummy'] |
session | Session driver | ['adapter' => '', 'auto_start' => false] |