PHP code example of aliene / phalcon-session-redis
1. Go to this page and download the library: Download aliene/phalcon-session-redis 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/ */
// a script that returns the total number of
// requests made during a given session's lifecycle.
session_start();
if (!isset($_SESSION['visits'])) {
$_SESSION['visits'] = 0;
}
$_SESSION['visits']++;
echo $_SESSION['visits'];