Manual:$wgCookieDomain/zh
From Linux Web Expert
<translate> Cookies</translate>: $wgCookieDomain | |
---|---|
Explicit domain for login cookies. |
|
<translate> Introduced in version:</translate> | pre 1.1.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (字符串) |
<translate> Default value:</translate> | '' |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
详情
Set to an explicit domain on the login cookies, e.g. thissubdomain.mydomain.org
or .mydomain.org
for all your subdomains.
如果默认的Cookie作用域没有设置,那么PHP中的setcookie
函数会将Cookie的作用域设为当前域。
This is a bad thing if e.g. your site is available from both www.example.com
and example.com
, since users that log into the former will be logged out as soon as they visit the latter.