php设置多值cookie的例子,代码:
复制代码 代码示例:
<?php
/**
* 设置php多值cookie
* by www.jb200.com
*/
if (!isset ($userdetails [0] ) ) {
setcookie ("userdetails[0]", $username);
}
$userdetails[1]++;
setcookie ("userdetails[1]", $userdetails[1]);
echo ("你好 $userdetails[0], 你已经访问本页:".$userdetails[1].($userdetails[1] == l?" time!": "times!"));
?>