Google News
logo
Yii framework - Interview Questions
How to get and set session in Yii?
To set session variables, you will need to apply a global PHP $_SESSION variable. Whereas to access the data stored in a session, you can do the following :
$session = Yii::$app->session;              // get a session variable.
Advertisement