PHP 쿠키 삭제 예제

Examples 2008. 1. 22. 16:57

PHP에서 쿠키를 삭제하는 함수를 제공하지는 않는다.

setcookie() 함수를 사용해서 해당 쿠키의 시간을 expire시키는 방법을 사용한다.



<?php
setcookie("user", "", time() - 3600);
?>



다음을 참고하기 바란다.



When deleting a cookie you should assure that the expiration date is in the past.



Reference:
http://www.w3schools.com/php/php_cookies.asp
Posted by 알 수 없는 사용자
,