Function Redis::setTimeout() is deprecated 的解决方法
本文参考 https://blog.csdn.net/xchenhao/article/details/97251618
感谢原作者分享
- PHP 操作 Redis 时遇到如下的问题
Deprecated: Function Redis::setTimeout() is deprecated
- 原因:php-redis 5 版本弃用了 Redis::delete()
使用以下命令或者网页输出phpinfo()方法查看redis版本
php -r 'phpinfo();'
解决方法:
使用 setTimeout() 的替代方法
expire()
其他弃用方法替代方法名访问以下链接:
https://blog.csdn.net/xchenhao/article/details/97251618