create config-directory if not existing

This commit is contained in:
dg9vh 2016-05-20 12:28:13 +00:00
parent 0d43078be4
commit da4ca087f7

View file

@ -19,6 +19,9 @@ include "include/tools.php";
<body>
<?php
if ($_GET['cmd'] =="writeconfig") {
if (!file_exists('./config')) {
mkdir('./config', 0777, true);
}
$configfile = fopen("config/config.php", w);
fwrite($configfile,"<?php\n");
fwrite($configfile,"# This is an auto-generated config-file!\n");