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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:34:16
Original
1158 people have browsed it

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的共享

Related labels:
source:php.cn
Statement of this Website
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
Latest Issues
Session
From 1970-01-01 08:00:00
0
0
0
session
From 1970-01-01 08:00:00
0
0
0
session login information
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template