1. Go to this page and download the library: Download brace/mod-session 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/ */
brace / mod-session example snippets
\Brace\Core\AppLoader::extend(function (\Brace\Core\BraceApp $app) {
(/*.....*/)
$app->setPipe([
new \Brace\Session\SessionMiddleware(
new \Brace\Session\Storages\FileSessionStorage("/tmp"), // replace this with your chosen storage type and connection string
3600, // 1 hour ttl
86400 // 1 day expiration time
),
(/*.....*/)
]);
});