view php/test_write.php @ 3111:9ac4f490a1d8

Merge branch 'master' into vnext # Conflicts: # python/timeline_view_movement.py # tests/examples/APE_example.xml
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 14 Jul 2018 15:30:27 +0100
parents 260efd43fe52
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>";
}
?>