xssbook2/web/helper/error.php

10 lines
232 B
PHP
Raw Normal View History

2024-03-30 16:14:42 +00:00
<?php /* Copyright (c) 2024 Freya Murphy */
function error_page($code, $msg) {
$root = $GLOBALS['webroot'];
error_reporting(E_ERROR | E_PARSE);
http_response_code($code);
require($root . '/views/template/error.php');
die();
}