tp5控制器中使用redis

开启redis就不多说了

cmd   

redis-server.exe redis.windows.conf

然后就是在控制器路连接啦

$redis = new \Redis();
        $redis->connect("127.0.0.1","6379");
        $redis->auth("123456");
        echo $redis->get("firstname");exit;

emmm,,,顺便说一句,我手贱设置了了密码123456....

猜你喜欢

转载自blog.csdn.net/qq_27596179/article/details/82467635