1:修改插件typecho_redis.class.php文件
public function init($option)
{
try{
$this->redis = new Redis();
$this->redis->connect($this->host, $this->port);
$this->redis->auth('redis密码');
}catch (Exception $e){
echo $e->getMessage();
}
}
2:修改redis配置文件
编辑配置文件redis.conf
requirepass 密码
有可能需要重启服务器
#如无特别声明,该文章均为 yun 原创,转载请遵循
署名-非商业性使用 4.0 国际(CC BY-NC 4.0) 协议,即转载请注明文章来源。
#最后编辑时间为: 2021 年 08 月 30 日
主题名称:DreamCat | 版本:X1.9-20210218
主题开发:HanFengA7 | TeddyNight | Dev-Leo | CornWorld | WBStudio | 学神之女
Designed by HanFengA7 Power by Typecho
Copyright © 2015-2021 by LychApe All rights reserved!