Home > Backend Development > PHP Tutorial > 无法打印cookie

无法打印cookie

WBOY
Release: 2016-06-20 12:36:44
Original
916 people have browsed it

    setcookie("myname", "xl", time()+60);    echo $_COOKIE["myname"];
Copy after login


为什么报错


回复讨论(解决方案)

刷新一下就可以

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