redis安装教程
redis7.2安装到window系统上面
https://download.csdn.net/download/qq_39161501/88269037
解决方案:修改配置php.ini文件
打开Apache目录下的php.ini文件,搜索extension,在空白处加上下列代码:
注:extension=php_igbinary.dll一定要放在前面,否则此扩展不会生效
extension=php_igbinary.dll
extension=php_redis.dll
tp5使用redis
public function index(){$redis=new Redis();//redis参数
$options= ['host' => '127.0.0.1','port' => 6379,'password' => '123456','select' => 0,'timeout' => 0,'expire' => 0,'persistent' => false,'prefix' => '',
];$redis= new Redis($options);$redis->set('name','你好啊');
$res = $redis->get('name'); //你好啊
var_dump($res);
die;
use think\cache\driver\Redis;
结果:
Redis Desktop Manager可视化数据库管理软件RDM下载