Using the Session_set_save_handler to present the session in Memcache
Then you want to restart the session and find that the data is not read.
When the session exists in file, the data can be read when the Session_Start () is called again.
But not in the memcache (of course, from the memcache can be obtained)
Question 1: Can I read the session data in Memcache by reusing existing sessions?
Question 2:session_start () How do I load data when I reuse an existing session?
Reply content:
Using the Session_set_save_handler to present the session in Memcache
Then you want to restart the session and find that the data is not read.
When the session exists in file, the data can be read when the Session_Start () is called again.
But not in the memcache (of course, from the memcache can be obtained)
Question 1: Can I read the session data in Memcache by reusing existing sessions?
Question 2:session_start () How do I load data when I reuse an existing session?
Session_Start () creates a new session or reuses existing sessions. If you submit a session ID by either a GET or POST, or by using a cookie, the existing session is reused.
http://php.net/manual/zh/function.session-start.php
The simplest way to do this is php.ini can be set directly
Method I: Global settings in php.ini
session.save_handler = memcachesession.save_path = "tcp://127.0.0.1:11211"
Method II:. htaccess in a directory:
php_value session.save_handler "memcache"php_value session.save_path "tcp://127.0.0.1:11211"
Method III: Again or in one application:
ini_set("session.save_handler", "memcache");ini_set("session.save_path", "tcp://127.0.0.1:11211");
I guess the landlord is the code to write a problem