2017-01-12 11 views

答えて

0

ZF3(またはZF2)では、あなたが使用する必要がありますZend\Db\Adapter\Adapter

$config = array(
    'driver' => 'Pdo', 
    'dsn'  => 'mysql:dbname=db;host=localhost', 
    'username' => 'root', 
    'password' => 'root', 
); 
// or 
$config = $serviceLocator->get('Config')['db']; 

$db = new \Zend\Db\Adapter\Adapter($config); 

ドキュメント:

https://framework.zend.com/manual/2.4/en/modules/zend.db.adapter.html https://framework.zend.com/manual/2.4/en/tutorials/tutorial.dbadapter.html

関連する問題