我正在使用zend-Framework3。我想连接到postgresql,但我不工作。这是我的global.php文件
return array (
'db' => array (
'driver' => 'Pdo',
'dsn' => 'pgsql:dbname = bdd;host = localhost',
'driver_options' => array (
),
),
);这是我的local.php文件
return [
'db' => [
'username' => 'root',
'password' => 'root',
]
];我已经激活了pgsql扩展和pdo_pgsql。有人能帮帮我吗?
发布于 2019-10-23 20:02:27
在全局do中(删除=后的空格)
return array (
'db' => array (
'driver' => 'Pdo',
'dsn' =>'pgsql:host=localhost;port=5432;dbname=pagila;user=postgres;password=postgres',
'driver_options' => array (
),
),
);在您的本地文件中
return array (
'db' => array (
'dsn' =>'pgsql:host=localhost;port=5432;dbname=pagila;user=postgres2;password=postgres2',
),
);https://stackoverflow.com/questions/58448398
复制相似问题