File: demos/cronjob.php

Recommend this page to a friend!
  Classes of Francesco Danti  >  ATK4 Session  >  demos/cronjob.php  >  Download  
File: demos/cronjob.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: 1 year ago
Size: 488 bytes



Class file image Download



$p = new \atk4\data\Persistence_SQL('mysql:dbname=atk4;host=localhost', 'atk4', '');

// create the table in database using schema\Migration
// use it one time to creqate the table, don't migrate on every call, please leave mysql alone ;)
(new \atk4\schema\Migration\MySQL(new \atk4\ATK4DBSession\SessionModel($p)))->migrate();

// init SessionHandler
(new \atk4\ATK4DBSession\SessionHandler($p))->executeGC();

For more information send a message to info at phpclasses dot org.