Home >Backend Development >PHP Tutorial > php网站共享session步骤(相同一级域名)

php网站共享session步骤(相同一级域名)

WBOY
WBOYOriginal
2016-06-13 12:38:121407browse

php网站共享session方法(相同一级域名)

这段时间做web开发使用的是php语言 要实现从主站进入子站时无需再登录(如已登录)

使用memcache实现 方法如下

修改php.ini如下

添加

extension=php_memcache.dll


并在php.ini中加入如下配置:

session.save_handler = memcache

session.save_path = tcp://192.168.1.240:11211

session.cookie_domain = xxx.com


即实现了多个子站及主站间的session的共享

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