7 $this->configPath = "";
11 function loadConfig($configpath)
13 error_log("loadConfig $configpath");
14 $this->configPath = $configpath;
15 $flt = file_get_contents($configpath);
16 $this->config = unserialize(base64_decode($flt));
21 function setConfigVar($var, $value)
23 if(is_array($this->config)) {
24 foreach($this->config as $vkey => $val) {
26 error_log("reset config of $var to $value");
27 $this->config[$var] = $value;
31 } else error_log("config isnt array");
34 error_log("set config of $var to $value");
35 $this->config[$var] = $value;
38 function delConfigVar($var)
40 if(is_array($this->config)) {
41 foreach($this->config as $vkey => $val) {
43 error_log("remove config of $var to $value");
44 unset($this->config[$var]);
48 } else error_log("config isnt array");
53 file_put_contents($this->configPath, base64_encode(serialize($this->config)));
59 echo "path: ".$this->configPath."\n";
60 print_r($this->config);