天天看點

tp6為什麼session要靜态方法::調用呢?(分析源碼)

use think\facade\Session;//引入session類檔案      
dump(Session::set('student.name',"cyg"));//設定session數組.第一個參數是變量 ,第二個是值哦
      dump(Session::get('student.name'));//擷取session數組