corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
filippo.bertilotti
2024-05-16 339a2b74c2dcdd4ae57161daba48d39a64337fbc
gestione dei codici di errore (404 e 500) (parte 103)
1 files modified
8 ■■■■ changed files
index.php 8 ●●●● patch | view | raw | blame | history
index.php
@@ -14,7 +14,13 @@
set_exception_handler(function (Throwable $exception) {
    static $show_errors = false;
    static $show_errors = true;
    if($exception instanceof Framework\Exceptions\PageNotFoundException) {
        http_response_code(404);
    } else {
        http_response_code(500);
    }
    if($show_errors) {
        ini_set("display_errors", "1");