本文整理匯總了PHP中session::logout方法的典型用法代碼示例。如果您正苦於以下問題:PHP session::logout方法的具體用法?PHP session::logout怎麽用?PHP session::logout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類session
的用法示例。
在下文中一共展示了session::logout方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getenv
<?php
//-----------------------------
// Programmer : SH.Jafarkhani
// Date : 94.06
//-----------------------------
require_once getenv("DOCUMENT_ROOT") . '/framework/session.php';
session::sec_session_start();
session::logout();
?>
<script>
window.location = "login.php";
</script>
示例2: locked
/**
* Checks if a user has attempted to login to many times or has been caught hacking the site
*/
function locked()
{
if ($_SESSION['wrong'] >= 3 || $_SESSION['hack'] >= 3) {
// if the user has three wrongs or three hack attempts
// logout the user, then add the IP of the user to the Blacklist
global $dbl;
global $mem;
if ($mem->loggedIn()) {
session::logout();
}
// if they are logged in log them out
$ip = getRealIp();
// get users ip
$dbl->blacklist($ip);
// add top blacklist
writeLog('Locked out automatically.');
sendLocked();
}
}
示例3: die
<?php
if (!defined('INTERFACE_ACCESS')) {
die('Direct access not premitted');
}
$session_id = $_REQUEST["session_id"];
echo json_encode(session::logout($session_id));