Mercurial > hg > webaudioevaluationtool
view php/test_write.php @ 3122:3e97bf9d24cf
YAUC
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 18 Jul 2018 16:52:21 +0100 |
parents | 53d701288da5 |
children | c7de85e03321 |
line wrap: on
line source
<?php incluce_once("config.php"); $saveLocation = getSaveLocation(); $file = $saveLocation."test-save.xml"; $state = file_put_contents($file, "<xml></xml>"); if ($state == FALSE) { echo "<response state=\"error\"><message>Could not open file</message></response>"; } else { unlink($file) or die("<response state=\"error\"><message>Could not open file</message></response>"); echo "<response state=\"OK\"><message>OK</message></response>"; } ?>