PHP Multi-Domain Sessions; ini_set Not Working?

后端 未结 3 646
南旧
南旧 2020-12-20 06:29

I\'m trying to set it up so if you log in to my website the session carries over to all sub-domains of my website. For example, if you go to domain.com and log in, then go t

3条回答
  •  猫巷女王i
    2020-12-20 07:13

    Well, if all else fails, you could implement your own sessions - all $_SESSION is in PHP is a wrapper around a cookie set/get and a file-backed datastore. If you store a cookie manually with an identifier and then associate data with that identifier (say, in a DB, even), you can get essentially the same functionality (serialize() may help if you want to store a bunch of varying session data).

提交回复
热议问题