diff php/requestKey.php @ 2628:9c7501dac617

#49. Correct string concat
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 19 Jan 2017 11:25:11 +0000
parents 0bce959c42ed
children 6324f500beb3
line wrap: on
line diff
--- a/php/requestKey.php	Thu Jan 19 11:23:02 2017 +0000
+++ b/php/requestKey.php	Thu Jan 19 11:25:11 2017 +0000
@@ -19,7 +19,7 @@
 // Get the current test URL
 $testURL = "";
 if (isset($_GET['url'])) {
-    $testURL = $_GET["url"];
+    $testURL = "../".$_GET["url"];
 }
 
 $saves = glob("../saves/*.xml");
@@ -58,7 +58,7 @@
 $doc_struct = new SimpleXMLElement('<waetresult/>');
 $doc_struct->addAttribute("key",$key);
 // Add the root
-if (file_exists("../".$testURL)) {
+if (file_exists($testURL)) {
     $test_proto = new SimpleXMLElement(file_get_contents($testURL, FILE_TEXT));
     $doc_struct->addChild($test_proto);
 }