<?php
// test_db.php
require_once __DIR__ . '/config/db.php';

try {
    // Пробуем простой запрос
    $stmt = $pdo->query("SELECT NOW() AS now, 1 AS test");
    $row  = $stmt->fetch(PDO::FETCH_ASSOC);
    echo "✅ DB Connection OK. Server time: " . htmlspecialchars($row['now']) . ". Test value: " . htmlspecialchars($row['test']);
} catch (PDOException $e) {
    echo "❌ DB Connection failed: " . htmlspecialchars($e->getMessage());
}
