You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
789 B
23 lines
789 B
<?php |
|
|
|
function db_we7() |
|
{ |
|
require __DIR__ . '/../../../../data/config.php'; |
|
|
|
$host = $config['db']['master']['host'] ?: $config['db']['host']; |
|
$port = $config['db']['master']['port'] ?: $config['db']['port']; |
|
$database = $config['db']['master']['database'] ?: $config['db']['database']; |
|
$username = $config['db']['master']['username'] ?: $config['db']['username']; |
|
$password = $config['db']['master']['password'] ?: $config['db']['password']; |
|
|
|
return [ |
|
'class' => 'yii\db\Connection', |
|
'dsn' => 'mysql:host=' . $host . ';port=' . $port . ';dbname=' . $database, |
|
'username' => $username, |
|
'password' => $password, |
|
'charset' => 'utf8', |
|
'tablePrefix' => 'ims_hjmall_', |
|
]; |
|
} |
|
|
|
return db_we7(); |