page: include path in page includes
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 12 Sep 2017 19:07:05 +0000 (21:07 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000 (20:21 +0200)
Prefer site customisations over minimedit defaults.

page.inc.php

index 0ca658920d98877769933d9ab9eace195de48ed8..b3fa5f7780b70d272b2844e592bcb29f74eb78ea 100644 (file)
@@ -1,9 +1,9 @@
 <?php
-include_once 'head.inc.php';
+include_once './head.inc.php';
 
 print "<header>\n";
 ob_start();
-include 'menu.html';
+include './menu.html';
 $nav = ob_get_clean();
 $nav = preg_replace_callback('{<a href="([^"]+)">(.*?)</a>}', function ($m) {
        $request = $_SERVER['REQUEST_URI'];
@@ -23,6 +23,6 @@ register_shutdown_function(function () {
        print "</body></html>\n";
 });
 
-include "$Page.html";
-if (file_exists("$Page.php")) include_once("$Page.php");
+include "./$Page.html";
+if (file_exists("$Page.php")) include_once("./$Page.php");