Home > Backend Development > PHP Tutorial > yii主域名通过a连接到二级域名,二级域名就登录不成功

yii主域名通过a连接到二级域名,二级域名就登录不成功

WBOY
Release: 2016-06-23 13:55:55
Original
703 people have browsed it

yii做的一个网站,通过a连接到二级域名页面,登录不了 Yii::app()->user->isGuest 该方法验证未登录成功


回复讨论(解决方案)

在线等回答 急 啊

很可能是cookie作用域的问题。修改 php.ini配置文件的cookie.domain项,例如您的域名是 hello.com。那么找到这项,修改成

session.cookie_domain = .hello.com
Copy after login

恩呢  我试下啊  稍等

好了 谢谢啊

怎么弄好的呀?我现在也碰到这个问题,但是修改php.ini  貌似也还不行 session.cookie_domain = .xxxx.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template