PHP Classes

File: demos/example/cronjob.example.php

Recommend this page to a friend!
  Classes of Francesco Danti   ATK4 Session   demos/example/cronjob.example.php   Download  
File: demos/example/cronjob.example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ATK4 Session
Store and retrieve PHP session data in a database
Author: By
Last change:
Date: 6 hours ago
Size: 413 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
Atk4\ATK4DBSession\Demos;

include
__DIR__ . '/../vendor/autoload.php';

use
Atk4\ATK4DBSession\SessionModel;
use
Atk4\Data\Persistence;

$p = Persistence::connect('mysql:dbname=atk4;host=localhost', 'atk4', '');

// Usually is not needed to run a forced GC, but if you need it, call it directly
(new \Atk4\ATK4DBSession\SessionHandler(new SessionModel($p)))->gc(3600);