1
0
mirror of https://github.com/ZeroDream-CN/PHPMC7 synced 2024-11-28 07:32:55 +08:00
PHPMC7/include/data/config.php.example
2018-09-10 14:53:00 +08:00

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 "";
}
}
}