class conf{
protected static $ins=null;
protected $data=array();
final protected function __construct(){
include ('include/config.inc.php');
$this->data=$_CFG;
}
final protected function __clone(){}
public static function getIns(){
if(self::$ins instanceof self ){
return $this->data[$key];
}else{
return null;
}
}
public function __set($key,$value){
$this_>data[$key]=$value;
}
}
$conf=conf::getIns();
繁星coding
慕勒3428872