How to delete a Cookie in Yii Framework 1.1

9 sec read

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']);

Last Updated On March 22, 2018

Leave a Reply

avatar
  Subscribe  
Notify of