Yii2.0 session的存取

//登录成功存session
yii::$app->session['names']=$names;
//取session
$names=Yii::$app->session['names'];
echo $names;
视图显示
<?php echo $_SESSION['names']?>
posted @ 2017-01-03 12:09  爱吃貓dē魚  阅读(833)  评论(0编辑  收藏  举报