PHP Classes

File: test/testDel.php

Recommend this page to a friend!
  Classes of Rubens Takiguti Ribeiro   PHP Smart Session   test/testDel.php   Download  
File: test/testDel.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script for test
Class: PHP Smart Session
Access sessions initialized only when necessary
Author: By
Last change:
Date: 11 years ago
Size: 556 bytes
 

Contents

Class file image Download
<?php
require_once(__DIR__ . '/../SmartSession.php');

$hasBefore = SmartSession::getInstance()->has('value');
SmartSession::getInstance()->del('value');
$hasAfter = SmartSession::getInstance()->has('value');

$json = array(
   
'hasBefore' => $hasBefore,
   
'hasAfter' => $hasAfter,
   
'value' => SmartSession::getInstance()->get('value'),
   
'open' => SmartSession::getInstance()->sessionIsOpen(),
   
'exist' => SmartSession::getInstance()->sessionExists()
);

header('Content-type: application/json');
echo
json_encode($json);
exit(
0);