使用zend2目前我使用(mysql)但我将改为使用postgres
代码:
<?php
return array(
'db' => array(
'driver' => 'Pdo',
'dsn' => 'pgsql:dbname=sample;host=127.0.0.1',
'driver_options' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8'
),
),
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory'
),
),
'module_layouts' => array(
'Application' => 'layout/layout.phtml',
'Admin' => 'layout/layout.phtml',
),
);
是否有PostgreSQL
等效的
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")?