浏览代码

Yii2 db persistent connection (#3708)

Joan Miquel 7 年之前
父节点
当前提交
28ef10d4f3
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      frameworks/PHP/yii2/app/index.php

+ 3 - 0
frameworks/PHP/yii2/app/index.php

@@ -18,6 +18,9 @@ $config = [
             'username' => 'benchmarkdbuser',
             'password' => 'benchmarkdbpass',
             'charset' => 'utf8',
+            'attributes' => [
+                PDO::ATTR_PERSISTENT => true,
+            ]
         ],
         'urlManager' => [
             'enablePrettyUrl' => true,