php7中如何設(shè)置COOKIE和銷毀COOKIE
創(chuàng)新互聯(lián)建站提供高防服務(wù)器、云服務(wù)器、香港服務(wù)器、服務(wù)器托管等
1,如何設(shè)置COOKIE
setcookie ( string $name [, string $value = "" [, int $expire = 0 [, string $path = "" [, string $domain = "96net.com.cn" [, bool $secure = false [, bool $httponly = false ]]]]]] ) : bool
setrawcookie() 再設(shè)置值時(shí)候原樣輸出
2,銷毀COOKIE
setcookie("TestCookie", $value, time()-3600);
3,獲取COOKIE值
echo $_COOKIE["TestCookie"];