mirror of
https://github.com/ZeroDream-CN/PHPMC7
synced 2026-05-17 02:54:03 +08:00
无可奉告
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
class Config {
|
||||
|
||||
public $conf = Array(
|
||||
'MySQL' => Array(
|
||||
'host' => 'localhost',
|
||||
'port' => 3306,
|
||||
'user' => 'root',
|
||||
'pass' => 'root',
|
||||
'name' => 'phpmc7'
|
||||
)
|
||||
);
|
||||
|
||||
public function __call($method, $args) {
|
||||
if(isset($this->conf[$method])) {
|
||||
return $this->conf[$method];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static function __callStatic($method, $args) {
|
||||
$Config = new Config();
|
||||
if(isset($Config->conf[$method])) {
|
||||
return $Config->conf[$method];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user