🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# redis.php redis服务器配置,active是默认激活的连接,可以通过代码在服务器启动时添加更多的连接池。 如果没有设置redis密码可以注释掉这一行,或者设置为空。 ``` $config['redis']['local']['password'] ``` ```php /** * 选择数据库环境 */ $config['redis']['enable'] = true; $config['redis']['active'] = 'local'; /** * 本地环境 */ $config['redis']['local']['ip'] = 'localhost'; $config['redis']['local']['port'] = 6379; $config['redis']['local']['select'] = 1; $config['redis']['local']['password'] = '123456'; /** * 本地环境2 */ $config['redis']['local2']['ip'] = 'localhost'; $config['redis']['local2']['port'] = 6379; $config['redis']['local2']['select'] = 2; $config['redis']['local2']['password'] = '123456'; /** * 这个不要删除,dispatch使用的redis环境 * dispatch使用的环境 */ $config['redis']['dispatch']['ip'] = 'unix:/var/run/redis/redis.sock'; $config['redis']['dispatch']['port'] = 0; $config['redis']['dispatch']['select'] = 1; $config['redis']['dispatch']['password'] = '123456'; $config['redis']['asyn_max_count'] = 10; /** * 最终的返回,固定写这里 */ return $config; ```