FurkanAkman adlı üyeden alıntı: mesajı görüntüle
database.php

return[
    'db' => [
        'name' => 'lisans',
        'host' => 'localhost',
        'user' => 'root',
        'pass' => ''
    ]
    ];
config.php

//DB Bilgileri ve Bağlantısı
$config = require __DIR__ . '/config.php';
try
{
    $db = new PDO('mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['name'], $config['db']['user'], $config['db']['pass']);
}
catch (PDOException $e)
{
    die($e -> getMessage());
}
Olarak deneme yapar mısın?
İlginize teşekkür ederim hocam, bu şekilde bağlantı alabiliyorum.