Session cookie and www

前端 未结 5 973
南方客
南方客 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:45

    I've experienced this problem with my cookies and your link in your post is great solving that.

    So far, I'v never experienced difficulties with Sessions. It's independent from domain or sub domains, they are stored on the server-side.

    You can Set in a config file a constant parameter DOMAIN_NAME, or in the DB, in prevision for your cookies, and then modify it only once.

提交回复
热议问题