Session cookie and www

前端 未结 5 989
南方客
南方客 2021-01-25 18:04

I would like to have my session work in my website when using www. AND when not using it. I\'ve read this thread: PHP cookie problem - www or without www

And this would

5条回答
  •  佛祖请我去吃肉
    2021-01-25 18:26

    Using the correct hostname across all requests is important for sessions. However, if you are going to be accessing cookies across multiple subdomains then you can specify the domain parameter with a prepended period. I.e.,

    .example.com

提交回复
热议问题