config.class.php
331 Bytes
<?php
Class Config{
static $vars = array();
public function init() {
$row = include($_SERVER['DOCUMENT_ROOT'] . '/config/config.php');
foreach($row as $key=>$value){
self::$vars[$key] = $value;
}
}
public function get($key){
return self::$vars[$key];
}
public function __get($key){
return self::$vars[$key];
}
}
?>