How do Thinkphp5.1 versions share session

now the project has two domain names under the same framework, one admin.xxxx.com, one api.xxxx.com, the controller corresponds to admin and api controller respectively,
cannot get the shared session
1, add ini_set ("session.cookie_domain", ".xxxx.com")
2
2
3, session.php

to the entry file.

Gods, please give me some advice. What you try online won"t work, and you can"t share it.

May.15,2022

delete the original cookie before it takes effect. Try again

clipboard.png


it is suggested that session can be managed by database in this case

Menu