天天看点

tp6为什么session要静态方法::调用呢?(分析源码)

use think\facade\Session;//引入session类文件      
dump(Session::set('student.name',"cyg"));//设置session数组.第一个参数是变量 ,第二个是值哦
      dump(Session::get('student.name'));//获取session数组