PHP Session Variable from subdomain to main domain

后端 未结 2 2053
鱼传尺愫
鱼传尺愫 2021-01-27 10:36

i Have setup 2 domains/sites in the ISPConfig on amazon Web server EC2 instance,

i have a domain named app.example.com and the other is https://www.example.com Both dom

2条回答
  •  攒了一身酷
    2021-01-27 11:04

    I would like to make a little correction,

    Bad: setcookie ("PassMySessionName", $_SESSION['user_name'], time() - 3600, "/", "example.com");

    Correct: setcookie ("PassMySessionName", $_SESSION['user_name'], time() + 3600, "/", "example.com");

提交回复
热议问题