Yii2数据库平

代码示例

2
0

yii2mysql平

public function ping() {
    try {
        Yii::$app->db->createCommand('SELECT 1')->query();
    } catch (\yii\db\Exception $exception) {
        Yii::$app->db->close();
        Yii::$app->db->open();
    }
}

类似页面

带有示例的类似页面

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................