本文整理汇总了PHP中es_session::set_sessid方法的典型用法代码示例。如果您正苦于以下问题:PHP es_session::set_sessid方法的具体用法?PHP es_session::set_sessid怎么用?PHP es_session::set_sessid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类es_session
的用法示例。
在下文中一共展示了es_session::set_sessid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
//act常量
define('ACT_2', $act2);
if (true) {
$url = get_domain() . APP_ROOT . "/" . APP_INDEX . "/index.php?requestData=" . $_REQUEST['requestData'] . "&r_type=2";
$api_log = array();
$api_log['api'] = $url;
$api_log['act'] = $class;
$api_log['parms'] = print_r($request, true);
$GLOBALS['db']->autoExecute(DB_PREFIX . "api_log", $api_log, 'INSERT');
}
$sessid = $request['session_id'];
if (empty($sessid)) {
$session_id = es_session::id();
$request['session_id'] = $sessid;
}
es_session::set_sessid($sessid);
require_once APP_ROOT_PATH . "system/model/user.php";
$city_id = intval($request['city_id']);
if ($city_id > 0) {
$_GET['city'] = $city_id;
}
require_once APP_ROOT_PATH . "system/model/city.php";
$GLOBALS['city'] = City::locate_city();
$GLOBALS['user_info'] = es_session::get("user_info");
if (empty($GLOBALS['user_info']) && $class != 'login') {
$cookie_uname = strim($request['email']);
//用户名或邮箱
$cookie_upwd = strim($request['pwd']);
//密码
if ($cookie_uname != '' && $cookie_upwd != '') {
$cookie_uname = strim($cookie_uname);
示例2: strim
global $define_sess_id;
$sess_id = strim($_REQUEST['session_id']);
if ($sess_id) {
$sess_verify = strim($_REQUEST['sess_verify']);
//开始为session获取一个新分配的id
$alloc_sess_id = es_session::id();
//再用指定sess_id打开
$define_sess_id = true;
es_session::set_sessid($sess_id);
es_session::restart();
unset($_REQUEST['session_id']);
if (es_session::get("sess_verify") == $sess_verify && es_session::get("sess_verify") != "") {
$define_sess_id = true;
es_session::delete("sess_verify");
} else {
es_session::set_sessid($alloc_sess_id);
es_session::restart();
$define_sess_id = false;
$sess_id = $alloc_sess_id;
}
} else {
$define_sess_id = false;
$sess_id = es_session::id();
}
$GLOBALS['tmpl']->assign("hash_key", HASH_KEY());
//用户信息
$user_info = es_session::get('user_info');
if ($module != "ajax") {
if ($user_info) {
$user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($GLOBALS['user_info']['id']) . " and is_effect = 1");
es_session::set('user_info', $user_info);