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

无法打印cookie

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-20 12:36:44938browse

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


为什么报错


回复讨论(解决方案)

刷新一下就可以

cookie 需要经过浏览器方能生效

Statement:
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