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");
时间: 2024-10-26 13:32:46