use think\facade\Session;//引入session类文件
dump(Session::set('student.name',"cyg"));//设置session数组.第一个参数是变量 ,第二个是值哦
dump(Session::get('student.name'));//获取session数组
因为tp6源码中是static定义的函数啦.
tp6为什么session要静态方法::调用呢?(分析源码)
阅读 123
2022-06-20
use think\facade\Session;//引入session类文件
dump(Session::set('student.name',"cyg"));//设置session数组.第一个参数是变量 ,第二个是值哦
dump(Session::get('student.name'));//获取session数组
因为tp6源码中是static定义的函数啦.
相关推荐
精彩评论(0)