PHP code example of ryanphpjs / expressphp-session

1. Go to this page and download the library: Download ryanphpjs/expressphp-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/ */

    

ryanphpjs / expressphp-session example snippets


$app->use(ExpressPHP\Plugins\Session::run(["secret" => "your_secret_key"]);

$req->session->set(string $name, mixed $value) : bool;

$req->session->get(?string $name) : mixed;

$req->session->unset($name) : bool|null;