host = '127.0.0.1'; $Session ->username = 'root'; $Session ->password = '111'; $Session ->dbname = 'test'; //定义会话过期时间 $Session ->setExpirationSeconds(300); //定义会话步骤次数 $Session ->setExpirationHops(2 , 'host'); $Session ->setExpirationHops(3 , 'username'); $Session ->setExpirationHops(4 , 'password'); $Session ->setExpirationHops(5 , 'dbname'); ?>