Php website sharing session step (same Level 1 domain name)

Source: Internet
Author: User
Tags php website
Php website sharing session method (same level-1 domain name) during this period of time for web development, the php language is required to achieve the entry from the main site to the sub-site without the need to log on again (such as logged on) use memcache to modify php as follows. ini: add extension = php_memcache.dll in php. add php website sharing session method in ini (same Level 1 domain name)

During this period of time, web development uses the php language to enable logon (for example, login is not required) when the main site enters the sub-site)

The implementation of memcache is as follows:

Modify php. ini as follows:

Add

Extension = php_memcache.dll


Add the following configuration in php. ini:

Session. save_handler = memcache

Session. save_path = tcp: // 192.168.1.240: 11211

Session. cookie_domain = xxx.com


This enables session sharing between multiple sub-sites and the master site.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.