Add -> add project

This commit is contained in:
2026-03-27 14:09:52 +03:30
commit 3327207f05
14 changed files with 403 additions and 0 deletions

13
app/core/db.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
$config = require __DIR__ . '/../config/config.php';
try {
$pdo = new PDO(
"mysql:host={$config['db']['host']};dbname={$config['db']['name']};charset=utf8mb4",
$config['db']['user'],
$config['db']['pass'],
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
);
} catch (Exception $e) {
die('Database connection error');
}
return $pdo;