Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takahashi-h5/3c41ca2e206f9e2f10e3fff64fa6da7f to your computer and use it in GitHub Desktop.
Save takahashi-h5/3c41ca2e206f9e2f10e3fff64fa6da7f to your computer and use it in GitHub Desktop.
// DB接続情報
$container = new Phalcon\Di\FactoryDefault();
$container->set(
'db',
function () {
return new Phalcon\Db\Adapter\Pdo\Postgresql(
[
'host' => 'localhost',
'port' => 5432,
'username' => 'postgres',
'password' => 'confrage',
'dbname' => 'postgres'
]
);
}
);
$app = new \Phalcon\Mvc\Micro($container);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment