Home > Backend Development > PHP Tutorial > 【新新手有关问题】cookie赋不了值

【新新手有关问题】cookie赋不了值

WBOY
Release: 2016-06-13 10:05:16
Original
910 people have browsed it

【新新手问题】cookie赋不了值
setcookie( "username ", "aaa ");    
setcookie( "userpass ", "bbb ");    
echo     $HTTP_COOKIE_VARS[ "username "];    
echo($userpass);    
echo($result[name]);    
 
 
上面语句只有echo($result[name]);能显示出内容echo     $HTTP_COOKIE_VARS[ "username "];和echo($userpass);都无法显示任何东西?请问哪里错了,谢谢!!!

------解决方案--------------------
$_COOKIE[ "username "];

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