X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/bb1eabd001954b5f9eb58b61f850a0cea111f87a..fd6a9af84cad3613810d7d0dbba5be5652b1a906:/page.php diff --git a/page.php b/page.php index 33a1f44..bb53a94 100644 --- a/page.php +++ b/page.php @@ -66,14 +66,15 @@ function getoutput($blocks = []) # custom error handling -define('DOCROOT', getcwd().'/'); +define('DOCROOT', getcwd()); +set_include_path(implode(PATH_SEPARATOR, [ DOCROOT, __DIR__ ])); function fail($error) { http_response_code(500); include_once 'page.inc.php'; ob_start(); - require_once DOCROOT.'500.html'; + require_once '500.html'; print getoutput(['debug' => $error]); } @@ -169,7 +170,7 @@ $Place += [ if (!$found) { # no resulting output http_response_code(404); - @require "./404.html"; + @require '404.html'; } include_once 'page.inc.php';