Mercurial > hg > webaudioevaluationtool
view php/test_write.php @ 2934:260efd43fe52
#228
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 11 Sep 2017 17:41:40 +0100 |
parents | |
children | 53d701288da5 |
line wrap: on
line source
<?php $file = "../saves/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>"; } ?>