PHP code example of davidlienhard / sessionhandler

1. Go to this page and download the library: Download davidlienhard/sessionhandler library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davidlienhard / sessionhandler example snippets


 declare(strict_types=1);
use DavidLienhard\SessionHandler\SessionHandler;

$sessionHandler = new SessionHandler($db);                          // create session handler object
session_set_save_handler($sessionHandler);                          // set custom session handler
session_start();                                                    // start session