在apache php的多级子域上使用cookie

在apache php的多级子域上使用cookie,php,apache,cookies,session-cookies,Php,Apache,Cookies,Session Cookies,我正在尝试允许在多级子域上共享cookie,如下所示: a、 test.exaxple.com b、 test.example.com 我希望cookie对两个子域都可见,但对www.example.com不可见 我尝试将cookie设置为“.test.example.com”,就像在普通子域中一样,但什么也没有。。 我怎么做 并非所有浏览器都支持此功能,请参见您是否将其设置为*.test.example.com,而不是test.example.com?我们不支持ie 7,因此它可以:)感谢您的

我正在尝试允许在多级子域上共享cookie,如下所示: a、 test.exaxple.com b、 test.example.com 我希望cookie对两个子域都可见,但对www.example.com不可见 我尝试将cookie设置为“.test.example.com”,就像在普通子域中一样,但什么也没有。。
我怎么做

并非所有浏览器都支持此功能,请参见您是否将其设置为
*.test.example.com
,而不是
test.example.com
?我们不支持ie 7,因此它可以:)感谢您的重播,但我的问题是关于两个级别的子域,您共享的链接只有一个级别。@edvinas.me我已经尝试过了“.test.example.com”、“*.test.example.com”,“test.example.com”上述任何一项都不起作用。。