PHP Classes

File: test/testSet.php

Recommend this page to a friend!
  Packages of Rubens Takiguti Ribeiro   PHP Smart Session   test/testSet.php   Download  
File: test/testSet.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: 13 years ago
Size: 410 bytes
 

 

Contents

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

SmartSession::getInstance()->set('value', 123);

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

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