From 1f0acdfe5fc4f37371fdde10fd4de4856fb7da06 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 11 Jul 2016 09:42:39 +0100 Subject: [PATCH] go-localhost-root.php added, resets and refreshes --- lib/go-localhost-root.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lib/go-localhost-root.php diff --git a/lib/go-localhost-root.php b/lib/go-localhost-root.php new file mode 100644 index 0000000..26af7a5 --- /dev/null +++ b/lib/go-localhost-root.php @@ -0,0 +1,33 @@ + "",'.PHP_EOL. + substr($settingsContents,($repPosEnd),strlen($settingsContents)); + + // Now update the config file + if (is_writeable($settingsFile)) { + $fh = fopen($settingsFile, 'w'); + fwrite($fh, $settingsContents); + fclose($fh); + // Now we've reset the root path to localhost root, refresh the file manager to show it + echo ""; + } else { + echo ""; + } + ?> + \ No newline at end of file