Home > Backend Development > PHP Tutorial > php cookie在后台赋值怎样在前台输出解决办法

php cookie在后台赋值怎样在前台输出解决办法

WBOY
Release: 2016-06-13 10:13:55
Original
926 people have browsed it

php cookie在后台赋值怎样在前台输出
我在后台设置的保存用户登陆的cookie 想在前台页面上显示出保存在cookie信息 可是没有显示出来 是不是cookie的作用域的问题呢 要怎样做才可以实现在前台显示出登录信息呢?

------解决方案--------------------
你查看你的phpinfo.php看看是否支持cooikes功能!
------解决方案--------------------
代码?
------解决方案--------------------
调用setcookie()函数,ohp向浏览器端发送header设置Cookie,至于能不能成功还得看浏览器。若成功,得等到下次请求服务器才能读取到cookie,并写入$_COOKIE变量

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