怎么设置session存储在redis中?

已邀请:

zkbhj - 凯冰科技站长

赞同来自:

打开php.ini文件,位置在/usr/local/php/etc/php.ini。
然后配置如下:
[Session]
; Handler used to store/retrieve data.
; http://php.net/session.save-handler
session.save_handler = redis

*
*
*

; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
; http://php.net/session.save-path
;session.save_path = "/tmp"
session.save_path = "tcp://redis.zkbhj.com:6379?prefix=zr_session:&timeout=6"

*
*
*

要回复问题请先登录注册