From: Mischa POSLAWSKY Date: Tue, 11 Jul 2017 16:19:47 +0000 (+0200) Subject: edit: root include from parent directory on subpages X-Git-Tag: v1.3~7 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/d4b4ac3445388cb47ecd0098a6b932a4491074b7 edit: root include from parent directory on subpages --- diff --git a/edit.php b/edit.php index 94206bb..1285959 100755 --- a/edit.php +++ b/edit.php @@ -29,7 +29,8 @@ if (!strlen($upload)) { exit; } -$prepend = "\n\n"; +$rootpath = str_repeat('../', substr_count($filename, '/')); +$prepend = "\n\n"; $append = "\n"; if (!file_put_contents($filename, $prepend . $upload . $append))