Mercurial > hg > webaudioevaluationtool
annotate php/test_write.php @ 3123:c7de85e03321
As 5pm approaches,the error count increases (YAUC)
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 18 Jul 2018 16:53:38 +0100 |
parents | 3e97bf9d24cf |
children |
rev | line source |
---|---|
nicholas@2934 | 1 <?php |
nicholas@3123 | 2 include_once("config.php"); |
nicholas@3120 | 3 $saveLocation = getSaveLocation(); |
nicholas@3120 | 4 $file = $saveLocation."test-save.xml"; |
nicholas@2934 | 5 $state = file_put_contents($file, "<xml></xml>"); |
nicholas@2934 | 6 if ($state == FALSE) { |
nicholas@2934 | 7 echo "<response state=\"error\"><message>Could not open file</message></response>"; |
nicholas@2934 | 8 } else { |
nicholas@2934 | 9 unlink($file) or die("<response state=\"error\"><message>Could not open file</message></response>"); |
nicholas@2934 | 10 echo "<response state=\"OK\"><message>OK</message></response>"; |
nicholas@2934 | 11 } |
nicholas@2934 | 12 ?> |