PHP Classes

File: app/logout.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   PHP Chat Application with API   app/logout.php   Download  
File: app/logout.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Chat Application with API
Exchange user messages on a page or using an API
Author: By
Last change:
Date: 6 months ago
Size: 328 bytes
 

Contents

Class file image Download
<?php
session_start
();

include_once
'config.php';
include_once
'src/Database.php';
include_once
'src/User.php';
include_once
'src/Utility.php';

$utils = new Utility();
$db = new Database($config);
$user = new User($db);

$user->setOffline($_SESSION['username']);

if (
session_destroy()) {
   
$utils->redirect("login.php");
}