Home >Backend Development >PHP Tutorial >PHP使用redis保存SESSION回话后,直接写$_SESSION['name'],就能用redis读取内容了吗?

PHP使用redis保存SESSION回话后,直接写$_SESSION['name'],就能用redis读取内容了吗?

WBOY
WBOYOriginal
2016-06-06 20:10:061007browse

PHP使用redis保存SESSION回话后,直接写$_SESSION['name'],就能用redis读取内容了吗?

回复内容:

PHP使用redis保存SESSION回话后,直接写$_SESSION['name'],就能用redis读取内容了吗?

https://www.ibleeu.com/index.php?g=&m=article&a=index&id=9

调用完这个函数后你的session操作就变成是用自定义的类的方法了,所以是你说的那样的应该

<code>session_set_save_handler(
    array($sessHandler, '_open'),
    array($sessHandler, '_close'),
    array($sessHandler, '_read'),
    array($sessHandler, '_write'),
    array($sessHandler, '_destroy'),
    array($sessHandler, '_clean')
);</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn