mirror of
https://github.com/ZeroDream-CN/PHPMC7
synced 2024-11-28 07:13:22 +08:00
30 lines
516 B
Plaintext
30 lines
516 B
Plaintext
<?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 "";
|
|
}
|
|
}
|
|
} |