Hello.
Help me please.
Here I have the code:
$date = date("DM d H:i:s T y", time()); $handler = fopen("путь к файлу .properties", "w"); fwrite($handler, "#Minecraft server properties\n#{$date}\n"); foreach($saveConfig AS $name => $value) { fwrite($handler, $name . "=" . $value . "\n"); } fclose($handler); In this case, the $ saveConfig parameter has data from the fields.
$saveConfig = $_POST['config']; $saveConfig['gamemode'] = intval($saveConfig['gamemode']); This field gives a parameter to $ saveConfig.
<input type="text" class="form-control" name="config[gamemode]" value="1"> But for some reason, when saving, writing to the file does not occur ... What is the problem?