Zend Framework2: Tutorial Part3 use TableGateway add references to the database connection

Just go to modify “config/autoload/global.php”

return array(
‘db’ => array(
‘driver’ => ‘Pdo’,
‘dsn’ => ‘mysql:dbname=test;host=localhost’,
‘username’ => ‘db_user’,
‘password’ => ”,
‘driver_options’ => array(
PDO::MYSQL_ATTR_INIT_COMMAND => ‘SET NAMES \’UTF8\”
),
),
‘service_manager’ => array(
‘factories’ => array(
‘Zend\Db\Adapter\Adapter’
=> ‘Zend\Db\Adapter\AdapterServiceFactory’,
),
),
);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s