setcookie('name',234,time()+10,'/');
//$b = $_COOKIE['name'];
echo $_COOKIE['name'];
为什么这个代码,第一次执行的时候报错,会报
Notice: Undefined index: name in D:\wamp\Apache\htdocs\test.php on line 10
未定义的索引 name ,我明明是先设置了COOKIE 再读取的啊?求详细解释
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证高级PHP讲师