From b6ef2ed36734cd9e0fb4dfa63e420bee6c59f0fe Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 14 Jun 2015 18:08:23 +0100 Subject: [PATCH] Get information on file from query string --- index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.php b/index.php index bc6063c..613b51c 100644 --- a/index.php +++ b/index.php @@ -3,6 +3,9 @@ require "property-manager.php"; // Initialise properties require "file_information.php"; $properties = load_properties(); +$file_name = $_GET[$properties["file QS"]] or die("No querystring given."); +if (file_exists($file_name)) {$GLOBALS["file"] = generate_file_object($file_name);} +else {die("File '$file_name' does not exist!");} header("Content Type: text/html"); ?> <?php echo($properties["html title"]);?>