メインコンテンツまでスキップ

Application::unsetCookie

COOKIEデータを削除

説明

public void Application::unsetCookie( [ string $name = "" ] )

COOKIEデータを削除します。

引数

名前データ型デフォルト備考
$namestringCookieパラメータキー

コントローラー - First.php
$this->setCookie('foo', 'bar');
コントローラー - Second.php
$this->getCookie('foo'); // -> bar
コントローラー - Third.php
$this->unsetCookie('foo');
echo $this->getCookie('foo'); // -> ''