Redis配置 2016.12.05

2016-12-17  本文已影响0人  yeqingwen

项目地址

https://github.com/yiisoft/yii2-redis/blob/master/docs/guide/README.md

1、add "yiisoft/yii2-redis":"~2.0.0"  to the require section of your composer.json

2、运行  : 

composer install

3、编辑配置文件 web.php

//....

'components' => [

    'redis' => [

        'class'=>'yii\redis\Connection',

        'hostname'=>'localhost',

        'port'=>6379,

        'database'=>0,

    ],

]

上一篇下一篇

猜你喜欢

热点阅读