corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
filippo.bertilotti
2024-05-16 ef05b97c0f79e13bfc7fdd8047085b13584d5d59
aggiunta di una view di errore generico (500.php) (parte 99)
1 files added
1 files modified
14 ■■■■■ changed files
index.php 3 ●●●● patch | view | raw | blame | history
views/500.php 11 ●●●●● patch | view | raw | blame | history
index.php
@@ -1,12 +1,13 @@
<?php
declare(strict_types= 1);
$show_errors = true;
$show_errors = false;
if($show_errors) {
    ini_set("display_errors", "1");
}else{
    ini_set("display_errors","0");
    require "views/500.php";
}
views/500.php
New file
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Error</title>
</head>
<body>
    Error 500: An error occurred
</body>
</html>