Mercurial > hg > webaudioevaluationtool
view php/pseudo.php @ 3114:54df1a21bf84
Modify the pseudo.php function to examine specific save prefixes or directory locations for tests
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 18 Jul 2018 13:56:15 +0100 |
parents | d26623bd65e0 |
children | b2138d9d5df6 |
line wrap: on
line source
<?php header('Access-Control-Allow-Origin: *'); header("Content-type: text/xml"); header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); if (isset($_GET["prefix"]) == FALSE) { $prefix = "" } else { $prefix = $_GET["prefix"]; } if (isset($_GET["dir"]) == FALSE) { $prefix = "" } else { $prefix = $_GET["dir"]; } $files = glob('../saves/' . $prefix . '*.xml'); $numsaves = 0; if ( $files !== false ) { $numsaves = count( $files ); } $files = glob('../tests/' . $dir . '*.xml'); $numtests = 0; if ( $numtests !== false ) { $numtests = count( $files ); } $testID = ($numsaves % $numtests); readfile($files[$testID]); ?>