Doctrine php DBAL not working

时间:2018-02-03 09:53:32

标签: php doctrine-orm doctrine

New to doctrine php and I followed each instruction to the point. Downloaded doctrine using composer as instructed on http://www.doctrine-project.org/projects/dbal.html and then on my index.php I added this http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#getting-a-connection only changing the test database credentials.

include_once 'vendor/autoload.php';

$config = new \Doctrine\DBAL\Configuration();

$connectionParams = array(
    'dbname' => 'teastdb',
    'user' => 'root',
    'password' => '',
    'host' => 'localhost',
    'driver' => 'pdo_mysql',
);


$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);

and this does not work (shows blank page, I even inserted both right and wrong credential for testing purpose). What is wrong?

Here is a screenshot as well

enter image description here

0 个答案:

没有答案