How to delete a Cookie in Yii Framework 1.1

H

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

About the author

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.

About Author

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.

Follow Me