Intermédiaire

This commit is contained in:
2021-04-02 11:26:26 +02:00
parent d2eefb6b5f
commit 0c681bf4ff
559 changed files with 39669 additions and 49754 deletions

View File

@@ -0,0 +1,23 @@
<?php
include_once("src/config/config.php");
$redis = new Redis();
$redis->connect($Cfg['redishost'], 6379);
/* Without enabling Redis::SCAN_RETRY (default condition) */
$it = NULL;
do {
// Scan for some keys
$arr_keys = $redis->scan($it);
// Redis may return empty results, so protect against that
if ($arr_keys !== FALSE) {
foreach($arr_keys as $str_key) {
echo nl2br("Here is a key: $str_key -- ");
$value = $redis->get($str_key);
echo nl2br($value."\n");
}
}
} while ($it > 0);
echo nl2br("No more keys to scan!\n");
echo nl2br("\n<a href='/index.php'>Accueil</a>\n");