добавил вывод ошибок на страницу api.php

This commit is contained in:
2025-08-26 01:28:02 +03:00
parent 3754cc9f03
commit d9c40857dd
2 changed files with 3 additions and 0 deletions

View File

View File

@@ -4,3 +4,6 @@ $db = new PDO("sqlite:../db/dns.sqlite");
$topDomains = $db->query("SELECT domain, COUNT(*) as hits FROM logs GROUP BY domain ORDER BY hits DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($topDomains);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);