PHP code example of atakde / psession

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

    

atakde / psession example snippets





akde\PSession\PSession;

// http only true
$session = new PSession([
    'cookie_httponly' => true,
]);

$session->start();
$session->set('name', 'John');
echo $session->get('name');

$session->destroy();


Session::get('user.name');
Session::set('user.name', 'Testing');