public static function start($uniacid, $openid, $expire = 3600) { WeSession::$uniacid = $uniacid; WeSession::$openid = $openid; WeSession::$expire = $expire; $sess = new WeSession(); session_set_save_handler(array(&$sess, 'open'), array(&$sess, 'close'), array(&$sess, 'read'), array(&$sess, 'write'), array(&$sess, 'destroy'), array(&$sess, 'gc')); session_start(); }
public static function start($uniacid, $openid, $expire = 3600) { if (empty($GLOBALS['_W']['config']['setting']['memcache']['session'])) { WeSession::$uniacid = $uniacid; WeSession::$openid = $openid; WeSession::$expire = $expire; $sess = new WeSession(); session_set_save_handler(array(&$sess, 'open'), array(&$sess, 'close'), array(&$sess, 'read'), array(&$sess, 'write'), array(&$sess, 'destroy'), array(&$sess, 'gc')); register_shutdown_function('session_write_close'); } session_start(); }