本文整理汇总了PHP中zen_session_start函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_session_start函数的具体用法?PHP zen_session_start怎么用?PHP zen_session_start使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_session_start函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zen_session_start
}
}
if ($spider_flag == false) {
zen_session_start();
$session_started = true;
} else {
if (isset($_GET['zenid']) && $_GET['zenid'] != '') {
$tmp = isset($_GET['main_page']) && $_GET['main_page'] != '' ? $_GET['main_page'] : FILENAME_DEFAULT;
@header("HTTP/1.1 301 Moved Permanently");
@zen_redirect(@zen_href_link($tmp, @zen_get_all_get_params(array('zenid')), $request_type, FALSE));
unset($tmp);
die;
}
}
} else {
zen_session_start();
$session_started = true;
}
unset($spiders);
/**
* set host_address once per session to reduce load on server
*/
if (!isset($_SESSION['customers_host_address'])) {
if (SESSION_IP_TO_HOST_ADDRESS == 'true') {
$_SESSION['customers_host_address'] = @gethostbyaddr($_SERVER['REMOTE_ADDR']);
} else {
$_SESSION['customers_host_address'] = OFFICE_IP_TO_HOST_ADDRESS;
}
}
/**
* verify the ssl_session_id if the feature is enabled
示例2: zen_session_recreate
function zen_session_recreate()
{
if (PHP_VERSION >= 4.1) {
$session_backup = $_SESSION;
unset($_COOKIE[zen_session_name()]);
zen_session_destroy();
if (STORE_SESSIONS == 'db') {
session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
}
zen_session_start();
$_SESSION = $session_backup;
unset($session_backup);
}
}