Tuesday, 15 July 2014

php - Property CWebApplication.Cookies is not defined -


I am using the yii framework to use cookie functionality. When I receive an application in the localhost, it returns the following error:

  Property CWebApplication.Cookies are not defined  

Please help those people Where I'm making a mistake.

I've included it in

'cookies' = & gt; In the array ('square' => 'application.compon.CookiesHelper'),

config-> main.php and I am trying to use the function PutCMsg as

$ this-> PutCMsg ('someCookieName', 'SomeValue');

But this error comes on this line of indices. Php

Yii :: createWebApplication ($ config) - & gt; Run ();

Make cookies in config / main.php Not a good solution. It's better to set cookies in the administrator's action:

  $ cookie = new CHttpCookie ('someCookieName', 'SomeValue'); $ Cookie- & gt; End = 200000; // time in milliseconds  

No comments:

Post a Comment