How to delete a Cookie in Yii Framework 1.1

No Comments

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.

Last Updated On March 22, 2018

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link