我这样设置了一个cookie
$id = 5; //just for clarification
setcookie("NAME", $id, time()+3600*24);
Run Code Online (Sandbox Code Playgroud)
并以这种方式寻找它
$cookie = $_COOKIE["NAME"];
Run Code Online (Sandbox Code Playgroud)
我检查这个cookie是否已设置(使用:if(isset($cookie)))并且它完美无缺.
问题是,此代码仅在设置cookie时有效,但如果没有,则会出现以下错误
Notice: Undefined index: NAME in [path], line [line]
Run Code Online (Sandbox Code Playgroud)
在某些情况下,cookie(自然)不会被设置.有没有办法可以处理它?
我使用公式从组中检索名称,并将它们放入Names类型的字段中:
@Name([CN];NAME)
Run Code Online (Sandbox Code Playgroud)
我想在我的代码中操纵这些数据,但是使用Lotusscript.无法在Google或Lotus Domino的帮助中找到它.有没有办法可以解决这个问题?