Mercurial > hg > webaudioevaluationtool
diff php/test_write.php @ 3017:209532a650da
Merge branch 'master' into vnext
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 12 Sep 2017 14:04:11 +0100 |
parents | 260efd43fe52 |
children | 53d701288da5 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/php/test_write.php Tue Sep 12 14:04:11 2017 +0100 @@ -0,0 +1,10 @@ +<?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>"; +} +?>