class Database
{
protected static $db = null;
private function __construct()
{
}
public static function getInstance ()
{
if (is_null(self::$db)) {
self::$db = new self;
}
return self::$db;
}
}
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All commentsSpeak rationally on civilized internet, please comply with News Comment Service Agreement