How to delete a Cookie in Yii Framework 1.1

To delete all Cookies execute the following command:

Yii::app()->request->cookies->clear();

To delete a specific cookie execute the command below, only replacing cookie_name with the name of your cookie:

unset(Yii::app()->request->cookies['cookie_name']);

Image Credits: Photo by Isis França on Unsplash.

More Similar Posts

No results found.

Menu