本文整理汇总了PHP中session::stop方法的典型用法代码示例。如果您正苦于以下问题:PHP session::stop方法的具体用法?PHP session::stop怎么用?PHP session::stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session
的用法示例。
在下文中一共展示了session::stop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stop_session
function stop_session()
{
//tester si session exist
$ss_id = cookie::Exists('ssid') ? cookie::Get('ssid') : "";
global $db;
$updatessid_sql = "update session set expir = CURRENT_TIMESTAMP where id ='{$ss_id} '";
if (!$db->Query($updatessid_sql)) {
$db->Kill('erreur Update session');
}
$session = new session();
$session->stop();
cookie::Delete('eonape');
}
示例2: header
<?php
if (Mreq::tg('_tsk') == 'errorjs' && Mreq::tg('noscript') == 0) {
//exit(Mreq::tg('noscript').' 1');
header('location:./');
} else {
//exit(Mreq::tg('noscript').' 2');
$session = new session();
if (!$session->stop()) {
return false;
} else {
view::load('ajax', 'errorjs');
}
}
示例3: stop
if ($administrator == 1) {
return true;
} else {
return false;
}
}
public static function stop()
{
session_unset();
session_destroy();
}
}
session::start();
// Handle logouts
if (isset($_GET['logout'])) {
session::stop();
header('Location: index.php');
exit;
}
// Handle logins
if (isset($_GET['login'])) {
if ($_GET['login'] == "guest" && $enable_guest_mode == 1) {
$_SESSION['guest'] = 1;
}
if ($_GET['login'] == "guest" && $enable_guest_mode != 1) {
$_SESSION['guest'] = 0;
}
if ($enable_user_login != 1) {
$login = $_POST['login'];
$password = $_POST['password'];
logSQL("POSSIBLE HACK ATTEMPT. Person was from IP: '" . getIP() . "'. and used Username: '{$login}' Password: '{$password}'.");
示例4: logout
public function logout()
{
global $db;
//Expire opened Session for this user
$val_session['expir'] = 'CURRENT_TIMESTAMP';
$whr_session['id'] = $this->token;
if (!$db->UpdateRows('session', $val_session, $whr_session)) {
$this->log .= $db->Error();
$this->error = false;
$this->log .= '</br>Problème fermeture sessions ouvertes';
}
$session = new session();
if (!$session->stop()) {
return false;
}
return true;
}
示例5: session
<?php
include 'session.class.php';
$session = new session();
$session->start();
$session->set('test', 'Kada Rachid');
$session->stop();
echo $session->get('test');
示例6: stop_session
function stop_session()
{
//tester si session exist
global $db;
$updatessid_sql = "update session set expir = CURRENT_TIMESTAMP where id ='" . $_SESSION['ssid'] . "'";
if (!$db->Query($updatessid_sql)) {
$db->Kill('erreur Update session');
}
$session = new session();
$session->stop();
cookie::Delete('eonape');
}