本文整理汇总了PHP中log::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP log::getInstance方法的具体用法?PHP log::getInstance怎么用?PHP log::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类log
的用法示例。
在下文中一共展示了log::getInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->log = log::getInstance();
$valid_passwords = array("admin" => "admin");
$valid_users = array_keys($valid_passwords);
$user = $_SERVER['PHP_AUTH_USER'];
$pass = $_SERVER['PHP_AUTH_PW'];
$this->isAdmin = in_array($user, $valid_users) && $pass == $valid_passwords[$user];
}
示例2: __construct
protected function __construct()
{
$settings = get_option('votesys_options');
$this->loging = log::getInstance();
$this->DB = new mysqli($settings['db_host'], $settings['db_user'], $settings['db_pass'], $settings['db_name']);
if ($this->DB->connect_error) {
$this->loging->log("dbConnect:constructor nepavyko prisijungti prie DB, " . $this->DB->connect_error, 1);
die($this->DB->connect_error);
}
}