2011-04-10 22:34:12 0 评论 Yii 1.0 Boy.Lee

Yii 1.0 Session控制

{Write}

Yii::app()->session['url']='http://yiilib.com';
Yii::app()->session->add('author','BoyLee');


{Read}

echo Yii::app()->session['url']; //http://yiilib.com
echo Yii::app()->session->get('author'); // BoyLee

{Destory}

Yii::app()->session->get('author')-> destroy();
unset(Yii::app()->session['url']);