Files
website/includes/dbh.inc.php
masiv_ 1b6d0f2d11
Some checks failed
Website Sync / website-sync (push) Failing after 7s
Databse inclusion
2026-02-04 15:17:55 -03:00

19 lines
502 B
PHP

<?php
declare(strict_types=1);
$host = "${{ secrets.DB_HOST }}";
$protocol = "${{ secrets.DB_PROTOCOL }}";
$dbname = "${{ secrets.DB_NAME }}";
$dsn = $protocol . ":host=" . $host . ";dbname=" . $dbname;
$dbusername = "${{ secrets.DB_USERNAME }}";
$dbpassword = "${{ secrets.DB_PASSWORD }}";
try {
$pdo = new PDO($dsn,$dbusername,$dbpassword);
$pdo->setAttribute(PDO::ERRMODE_EXCEPTION,PDO::ATTR_ERRMODE);
} catch (PDOException $e) {
echo "An error has ocurred: " . $e->getMessage();
}