Yii Framework

How to delete a Cookie in Yii Framework 1.1

Written by Ian Carnaghan · 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
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

avatar
  Subscribe  
Notify of