Think/Db.php
private static function getConfig()
    {
        return [
            'type'        => C('DB_TYPE'),
            'username'    => C('DB_USER'),
            'password'    => C('DB_PWD'),
            'hostname'    => C('DB_HOST'),
            'hostport'    => C('DB_PORT'),
            'database'    => C('DB_NAME'),
            'dsn'         => C('DB_DSN'),
            'params'      => C('DB_PARAMS'),
            'charset'     => C('DB_CHARSET'),
            'deploy'      => C('DB_DEPLOY_TYPE'),
            'rw_separate' => C('DB_RW_SEPARATE'),
            'master_num'  => C('DB_MASTER_NUM'),
            'slave_no'    => C('DB_SLAVE_NO'),
            'debug'       => C('DB_DEBUG', null, APP_DEBUG),
        ];
    }
private static function getConfig()
    {
        return [
            'type'        => C('DB_TYPE'),
            'username'    => C('DB_USER'),
            'password'    => C('DB_PWD'),
            'hostname'    => C('DB_HOST'),
            'hostport'    => C('DB_PORT'),
            'database'    => C('DB_NAME'),
            'dsn'         => C('DB_DSN'),
            'params'      => C('DB_PARAMS'),
            'charset'     => C('DB_CHARSET'),
            'deploy'      => C('DB_DEPLOY_TYPE'),
            'rw_separate' => C('DB_RW_SEPARATE'),
            'master_num'  => C('DB_MASTER_NUM'),
            'slave_no'    => C('DB_SLAVE_NO'),
            'debug'       => C('DB_DEBUG', null, APP_DEBUG),
        ];
    }
数据库连接参数解析
@static

@return array