comparison php/get_tests.php @ 3120:53d701288da5

Create new php config to allow saves to be stored outside of web scope
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Wed, 18 Jul 2018 16:47:07 +0100
parents 464c6c6692d6
children edd536f01e4b
comparison
equal deleted inserted replaced
3119:aa4503f8c630 3120:53d701288da5
10 10
11 include "rel2abs.php"; 11 include "rel2abs.php";
12 12
13 // XML Saves location - assumes it will be saves/ 13 // XML Saves location - assumes it will be saves/
14 $data = array(); 14 $data = array();
15 $saves = glob("../saves/*.xml"); 15 $saveLocation = getSaveLocation();
16 $saves = glob($saveLocation."*.xml");
16 if (is_array($saves)) 17 if (is_array($saves))
17 { 18 {
18 foreach($saves as $filename) { 19 foreach($saves as $filename) {
19 $xml_string = file_get_contents($filename, FILE_TEXT); 20 $xml_string = file_get_contents($filename, FILE_TEXT);
20 $xml_object = simplexml_load_string($xml_string); 21 $xml_object = simplexml_load_string($xml_string);