Send 404 on non-existing pages

This commit is contained in:
Daniel Winzen
2020-11-08 22:57:49 +01:00
parent d0f1f60c20
commit 3f97c7d168
4 changed files with 53 additions and 40 deletions

View File

@ -3,7 +3,7 @@ require_once __DIR__.'/../common_config.php';
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){
http_send_status(500);
http_response_code(500);
die($I['nodb']);
}
$links = [];