This article mainly introduced the PHP will session into the Memcached setting method, needs the friend may refer to under
Can modify the php.ini file: 1, modify the code in PHP.ini as follows: Session.save_hander = Memcache; Session.save_path = "Tcp://host: port number";//For example: Session.save_path = "tcp://127.0.0.1:11211"; 2, normal access to the value of the session is OK. You cannot modify the php.ini file: A, dynamically modify the settings in php.ini. The code is as follows: Ini_set (' Session.save_hander ', ' memcache '); Ini_set (' Session.save_path ', ' tcp://127.0.0.1:11211 '); Description: Ini_set () is only valid for the current PHP page, and will not modify the php.ini file itself, and will not affect other PHP pages. b, normal access to the value of the session is OK. The main purpose of Memcache and session comparison Memcache is to ease the database pressure and speed up, so it is a stateless data (stateless data: the current data is not tied to a user, such as: Lee's data, Richard can be taken out, As long as you know the corresponding key value can be the session data is bound to the user and is therefore a stateful data. Memcache security will be memcache into the intranet, with a firewall to prevent external access to memcached data changes frequently, with instability, do not need real-time warehousing, security, low