14 lines
291 B
PHP
14 lines
291 B
PHP
<?php
|
|
/* redirection */
|
|
define('BASE_PATH', rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'));
|
|
|
|
function redirect(string $uri): never {
|
|
header('Location: ' . BASE_PATH . $uri);
|
|
exit;
|
|
}
|
|
|
|
// include from root
|
|
function r(string $filename) {
|
|
return dirname(__DIR__, 1) . '/' . $filename;
|
|
}
|