=') && version_compare(PHP_VERSION,'5.2.3','>=')){ mysql_set_charset($z_charset); }else{ mysql_query("SET NAMES {$z_charset}"); } //open function z_s_open($z_s_path,$z_s_name){ return true; } //close function z_s_close(){ return true; } //read function z_s_read($zr_s_id){ global $z_dtable; $zr_sql="select s_value from {$z_dtable} where s_id like '{$zr_s_id}' and s_expired > ".time(); $zr_query=mysql_query($zr_sql); if(list($zr_value)=mysql_fetch_row($zr_query)){ return $zr_value; }else{ return false; } } //write function z_s_write($zw_s_id,$zw_s_value){ global $z_lifetime,$z_dtable; $zw_expired = time()+$z_lifetime; $zw_value = $zw_s_value; mysql_query("delete from {$z_dtable} where s_id like '{$zw_s_id}' and s_expired < ".time()); mysql_query("select id from {$z_dtable} where s_id like '{$zw_s_id}'"); if(mysql_affected_rows() > 0){ $zw_query = mysql_query("update {$z_dtable} set s_expired = '{$zw_expired}',s_value='{$zw_value}' where s_id like '{$zw_s_id}' and s_expired > ".time()); }else{ $zw_query = mysql_query("insert into {$z_dtable} (s_id,s_expired,s_value) values ('{$zw_s_id}','{$zw_expired}','{$zw_value}')"); } return $zw_query; } //destroy function z_s_destroy($zd_s_id){ global $z_dtable; $zd_query = mysql_query("delete from {$z_dtable} where s_id like '{$zd_s_id}' limit 1"); return $zd_query; } //gc function z_s_gc($z_s_maxlifetime){ return true; } //delete expired sessions function z_del_sessions(){ global $z_dtable; mysql_query("delete from {$z_dtable} where s_expired < ".time()); mysql_query("optimize table {$z_dtable}"); } //z_gc function gc_mt_rand($gc_t=20){ $r = mt_rand(0,99); if($r < $gc_t) return true; return false; } //gc delete expired sessions if(gc_mt_rand($z_probability)){z_del_sessions();} //set handler,session start session_set_save_handler('z_s_open','z_s_close','z_s_read','z_s_write','z_s_destroy','z_s_gc'); session_start(); ?>
Notice: Constant root_url already defined in D:\ruifenglong\bch\class\config.php on line 3

Notice: Constant web_name already defined in D:\ruifenglong\bch\class\config.php on line 4

Notice: Constant web_keywords already defined in D:\ruifenglong\bch\class\config.php on line 5

Notice: Constant web_description already defined in D:\ruifenglong\bch\class\config.php on line 6

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in D:\ruifenglong\bch\class\conn.php on line 16

Notice: Undefined index: fn_id in D:\ruifenglong\bch\products_show.php on line 3
瑞丰隆农业技术查询系统

Notice: Undefined index: key in D:\ruifenglong\bch\head.php on line 2

Notice: Undefined index: type in D:\ruifenglong\bch\head.php on line 3
首页 全部分类
Notice: Undefined variable: c_id in D:\ruifenglong\bch\products_show.php on line 202

发布时间:1970-01-01     点击率:
网友评论
暂无评论
发表评论
用户名:
验证码:  看不清楚,换一张