yii2的redis扩展
在yii的config目录下,编辑web.php,在components中加上password配置项:
‘redis’ => [
‘class’ => ‘yii\redis\Connection’,
‘hostname’ => ‘localhost’,
‘port’ => 6379,
‘database’ => 0,
‘password’ => ‘123456’,
],
在使用时就不用手动去做auth验证了
yii2的redis扩展
在yii的config目录下,编辑web.php,在components中加上password配置项:
‘redis’ => [
‘class’ => ‘yii\redis\Connection’,
‘hostname’ => ‘localhost’,
‘port’ => 6379,
‘database’ => 0,
‘password’ => ‘123456’,
],
在使用时就不用手动去做auth验证了