Files
openlayers/master/examples/checkstyle.php.rename.html
Éric Lemoine 5d14b9e2d4 Updated
2013-02-20 10:38:25 +01:00

31 lines
543 B
HTML

<?php
$action = $_POST["action"];
$fileName = $_POST["filename"];
$contents = $_POST["contents"];
if ($action == "save") {
save($fileName, $contents);
}
function save($fileName, $contents) {
$fileName = "../../".$fileName.".checkstyle.js";
$fh = fopen($fileName, 'w');
fwrite($fh, stripslashes($contents));
fclose($fh);
print "File saved to $fileName\n";
}
if(false) {
?>
<html>
<body>
Rename this file to checkstyle.php to enable saving fixed files.
</body>
</html>
<?php
}
?>