yii2-netdisk/config/db.php
Chenx221 ae7e3ae7a9
移动一些敏感的数据到.env
.env.example为示例配置文件
用法自己看文件内容
2024-02-27 15:40:19 +08:00

20 lines
494 B
PHP

<?php
use yii\db\Connection;
return [
'class' => Connection::class,
'dsn' => 'mysql:host='.$_ENV['DB_HOST'].';dbname='.$_ENV['DB_NAME'],
'username' => $_ENV['DB_USERNAME'],
'password' => $_ENV['DB_PASSWORD'],
'charset' => 'utf8',
'schemaMap' => [
'mysql' => SamIT\Yii2\MariaDb\Schema::class
]
// Schema cache options (for production environment)
//'enableSchemaCache' => true,
//'schemaCacheDuration' => 60,
//'schemaCache' => 'cache',
];