Bushi
(Pedroguarimata)
1
hi all, a best way question. 
what is better?
open the session to the operation and close it. something like this
function foo(){
$sesion->open();
...
//some operations
....
$sesion->close();
}
or open the user’s session when the index created the app and close it at the AFTER_REQUEST event.
Bizley
(Bizley)
2
Just for the info - you don’t have to start session manually, every session method invokes open() automatically.
Bushi
(Pedroguarimata)
3
thk bizley, i didn’t know that
.
other question
.
because Yii code \ web \ session :: get () will not close the session after opening it?
while the request is served, Yii never close the session?
Bizley
(Bizley)
4
You don’t have to close the session if there are no special reasons to do so. See http://php.net/manual/en/function.session-write-close.php