コード例 #1
0
ファイル: SessionsApc.php プロジェクト: gintsmurans/staticphp
 public function destroy($id)
 {
     apc_delete($this->prefix . $id);
     if (!empty($this->db_link)) {
         parent::destroy($id);
     }
     return true;
 }
コード例 #2
0
ファイル: UserController.php プロジェクト: nc1991/Basic-MVC
 public function logout()
 {
     /*
      * compares session token against get method to see if it's the actual user
      */
     if (Sessions::get('token') == Requests::get('token')) {
         Sessions::destroy();
     }
 }
コード例 #3
0
<?php

require "Sessions.php";
$ses = new Sessions();
$ses->init();
$user = isset($_SESSION['user']) ? $_SESSION['user'] : null;
if ($user != null) {
    $ses->destroy();
    header("location: ../Index.php");
}
コード例 #4
0
<?php

require '../class/sessions.php';
$objses = new Sessions();
$objses->init();
$objses->destroy();
header('Location:  ../index.php');