English 中文(简体)
我如何使用多个次主题中的会议变量?
原标题:How do I use session variables across multiple sub-domains?

当我从我们的网站通知电子邮件中点击链接时,我就一直在损失本届会议的变量。 我在长时间内打破了我的头脑之后,今天我认识到,www.domain-name.com没有包含会议变量,而域名.com确实!

为什么发生这种情况? 我做了些什么来确定事情权(php-apache)?

最佳回答
问题回答

Sessions are based on cookies, which are per-domain.
www.domain.com is a different domain than domain.com, so their cookies are kept separate.

标准做法是选择一个变量和301,将其他变量转至优先变量。

本届会议的ID储存在一个厨师身上,可以具体指明它如何对域名作出反应。

Take a look at PHP s setcookie documentation.

你们可以改变PHP的会堂结构,并:

ini_set("session.cookie_domain", ".mydomain.com");

“www”在技术上没有任何特殊意义。 “www.domain.com”的域名与“www.domain.com”不同;如果你想与之联系的话,那就需要在某个地方明确,通常是在吉大港山区理工学院服务器配置中。





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签