Ocs-server/Gfx4/Editing config files programmatically

GFX provides a handy class that lets you edit config files programmatically to create easy admin modes and settings managers.

All changes are made in ram before being saved to disk with the save() method. Remember to call save(), or your changes will be lost at the end of object's life.

<?php
//constructor, $namefile can be empty
$config = new EConfigFile($namefile);
//set $key with $value
$config->set($key, $value);
//get $value associated to $key
$config->get($key);
//delete $key from config file
$config->del($key);
//apply modifications, save
$config->save();
?>

This page was last edited on 5 May 2016, at 15:48. Content is available under Creative Commons License SA 4.0 unless otherwise noted.
-->