summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7fa478)
Uniform behaviour, preferring site-specific overrides and falling back
to shared files (without requiring symlinks).
<?php
$body = getoutput(@$Place);
<?php
$body = getoutput(@$Place);
-include_once DOCROOT.'head.inc.php';
+include_once 'head.inc.php';
print "<header>\n";
ob_start();
print "<header>\n";
ob_start();
-include DOCROOT.'menu.html';
ob_start();
if (!empty($User)) {
print '<div class="login"><p>';
ob_start();
if (!empty($User)) {
print '<div class="login"><p>';
register_shutdown_function(function () {
print '<footer>';
register_shutdown_function(function () {
print '<footer>';
- @include DOCROOT.'footer.html';
+ @include 'footer.html';
print "</footer>\n";
global $User;
print "</footer>\n";
global $User;
-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();
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]);
}
print getoutput(['debug' => $error]);
}
if (!$found) {
# no resulting output
http_response_code(404);
if (!$found) {
# no resulting output
http_response_code(404);
}
include_once 'page.inc.php';
}
include_once 'page.inc.php';