annotate php/test_write.php @ 3096:90c7b42264d4

Moved on-page indicators to v1.2.3. Added minified JS versions
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 12 Jan 2018 23:31:29 +0000
parents 260efd43fe52
children 53d701288da5
rev   line source
nicholas@2934 1 <?php
nicholas@2934 2 $file = "../saves/test-save.xml";
nicholas@2934 3 $state = file_put_contents($file, "<xml></xml>");
nicholas@2934 4 if ($state == FALSE) {
nicholas@2934 5 echo "<response state=\"error\"><message>Could not open file</message></response>";
nicholas@2934 6 } else {
nicholas@2934 7 unlink($file) or die("<response state=\"error\"><message>Could not open file</message></response>");
nicholas@2934 8 echo "<response state=\"OK\"><message>OK</message></response>";
nicholas@2934 9 }
nicholas@2934 10 ?>