<?php
namespace daswork\lib;
class Config
{
// 配置参数
private static $config = [];
public static function load($file=''){
if(is_file($file)) {
self::$config = include_once($file);
} else {
self::$config = include_once(DAS_PATH . DS . 'config.php');
}
}
public static function get($name='')
{
if ($name) {
return self::$config[$name];
} else {
return self::$config;
}
}
}
|