本文整理匯總了PHP中CAppUI::isTokenSessionExpired方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::isTokenSessionExpired方法的具體用法?PHP CAppUI::isTokenSessionExpired怎麽用?PHP CAppUI::isTokenSessionExpired使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::isTokenSessionExpired方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: session_write_close
session_write_close();
}
CSessionHandler::setHandler(CAppUI::conf("session_handler"));
// Start session
CSessionHandler::start();
// Ignore aborted HTTP request, so that PHP finishes the current script
ignore_user_abort(true);
// Register shutdown function to end the session
register_shutdown_function(array("CSessionHandler", "writeClose"));
// Check if the session was made via a temporary token
// and save its expiration date
if (isset($_SESSION["token_expiration"])) {
CAppUI::$token_expiration = $_SESSION["token_expiration"];
}
// Reset session if it expired
if (CAppUI::isTokenSessionExpired()) {
CAppUI::$token_expiration = null;
// Free the session data
CSessionHandler::end(true);
// Start it back
CSessionHandler::start();
}
// Check if session has previously been initialised
if (empty($_SESSION["AppUI"]) || isset($_GET["logout"])) {
$_SESSION["AppUI"] = CAppUI::init();
}
CAppUI::$instance =& $_SESSION["AppUI"];
CAppUI::$instance->session_name = $session_name;
if (!isset($_SESSION["locked"])) {
$_SESSION["locked"] = false;
}