laravel session使用 转自http://blog.csdn.net/angle_hearts/article/details/53923782

use Symfony\Component\HttpFoundation\Session\Session;
//存储session

$session = new Session;
$session->set("u_name",$ar->u_name);
$session->set("u_pwd",$ar->u_pwd);
//每次取session必加上

use Symfony\Component\HttpFoundation\Session\Session;

//取session

$session = new Session;
$ss=$session->get("u_name");

上一篇:tomcat部署javaweb项目的三种方式


下一篇:istringstream的操作