public function __construct() { if (!self::$redis) { include APPPATH . "config/redis.php"; self::$redis = new Client($config); } }
/** * 记录登录redis数据 * @param $uid * @param $user_type */ private function redis_login($uid, $user_type) { $key = "user:login:"******"1"; $redis = new WRedis(); $redis->set($key, $value); }