Mercurial > hg > webaudioevaluationtool
comparison php/comment_parser.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 | c7de85e03321 |
comparison
equal
deleted
inserted
replaced
3119:aa4503f8c630 | 3120:53d701288da5 |
---|---|
1 <?php | 1 <?php |
2 incluce_once("config.php"); | |
2 // Comment Parser for PHP | 3 // Comment Parser for PHP |
3 header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); | 4 header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
4 header("Cache-Control: post-check=0, pre-check=0", false); | 5 header("Cache-Control: post-check=0, pre-check=0", false); |
5 header("Pragma: no-cache"); | 6 header("Pragma: no-cache"); |
6 class audioElement { | 7 class audioElement { |
18 $this->id = $id; | 19 $this->id = $id; |
19 $this->elements = array(); | 20 $this->elements = array(); |
20 } | 21 } |
21 } | 22 } |
22 // XML Saves location - assumes it will be saves/ | 23 // XML Saves location - assumes it will be saves/ |
23 $saves = glob("../saves/*.xml"); | 24 $saveLocation = getSaveLocation(); |
25 $saves = glob($saveLocation."*.xml"); | |
24 $comment_struct = array(); | 26 $comment_struct = array(); |
25 if (is_array($saves)) | 27 if (is_array($saves)) |
26 { | 28 { |
27 foreach($saves as $filename) { | 29 foreach($saves as $filename) { |
28 $xml_string = file_get_contents($filename, FILE_TEXT); | 30 $xml_string = file_get_contents($filename, FILE_TEXT); |