摘要:
设置cookie://首先新建cookie$cookie = new CHttpCookie(‘mycookie’, ‘this is my cookie’);//定义cookie的有效期$cookie->expire = time()+60*60*24*30; //有限期30天//把cookie写入cookies使其生效Yii::app()->request->cookies['mycookie']=$cookie;注意:CHttpCookie定义的cookie名”mycookie”与Yii::app()->request->cookies[ 阅读全文