在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 class Session 2 { 3 function Session() 4 { 5 session_start(); 6 } 7 8 function set($name, $value) 9 { 10 $_SESSION[$name] = $value; 11 } 12 13 function get($name) 14 { 15 if(isset($_SESSION[$name])) 16 return $_SESSION[$name]; 17 else 18 return false; 19 } 20 21 function del($name) 22 { 23 unset($_SESSION[$name]); 24 } 25 26 function destroy() 27 { 28 $_SESSION = array(); 29 session_destroy(); 30 } 31 32 function save_prefs() 33 { 34 global $db, $auth; 35 $prefs = serialize($this->prefs); 36 $db->query("UPDATE condra_users SET prefs = '$prefs' WHERE id = '{$auth->id}'"); 37 } 38 }
|
2022-08-17
2022-11-06
2022-08-17
2022-07-18
2022-07-18
请发表评论