Skip to content

Instantly share code, notes, and snippets.

@phalcon
Last active December 10, 2015 18:58
Show Gist options
  • Select an option

  • Save phalcon/4477861 to your computer and use it in GitHub Desktop.

Select an option

Save phalcon/4477861 to your computer and use it in GitHub Desktop.
<?php
$di->set('db', function() use ($config) {
$connection = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
"host" => "localhost",
"username" => "root",
"password" => "secret",
"dbname" => "test",
"options" => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'set names utf8',
)
));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment