This commit is contained in:
System Administrator
2011-03-31 06:01:16 +04:00
parent 4c4b0d310d
commit 78da6e4f11
88 changed files with 21309 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
class Config {
private static $_config = array();
public static function loadFile($config_name, $file_path) {
self::$_config[$config_name] = parse_ini_file($file_path, true);
}
public static function get($str) {
$path = explode(':', $str);
$res = self::$_config;
for ($i = 0; $i < count($path); $i++) {
$res = $res[$path[$i]];
}
return $res;
}
}
?>