Ejemplo n.º 1
0
 /**
  * 初始化
  * @throws App_Exception
  * @return class
  */
 public static function init()
 {
     $f = App_Info::config('LIMIT_ENABLE');
     if (!$f) {
         return;
     }
     $c = App_Info::config('LIMIT_CONFIG');
     $ins = new Limit_Visit();
     self::$over_limit = !$ins->visit($c['interval'], $c['count'], $c['key']);
 }
Ejemplo n.º 2
0
 /**
  * 获取单例
  */
 public static function get_instance()
 {
     if (!self::$_instance) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }