php多值cookie的小例子
时间:2021-07-01 10:21:17
帮助过:17人阅读
- /**
- * 设置php多值cookie
- * by bbs.it-home.org
- */
- 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!"));
- ?>
|