<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ namespace app\admin\controller; /** * Description of Task * * @author sgq */ class Task { public function index() { $redis = new \think\cache\driver\Redis(); $redis->set("test",1); exit(); $redis = new \Redis(); $redis->connect("127.0.0.1", 6379); $redis->auth("g2#&beauty.cng"); var_dump($redis->hget("product",2301)); } public function add() { } public function edit() { } public function delete() { } }