PHP code example of lite-view / redis

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

    

lite-view / redis example snippets





置方式一
const REDIS_CONNECTION = [
    'host' => '127.0.0.1',
    'port' => 6379,
    'prefix' => 'test:',
];


// 配置方式二
//\LiteView\Redis\Config::set('127.0.0.1', 6379, 'test:');


$r = \LiteView\Redis\RedisCli::select()->keys('*');
print_r($r);


$r = \LiteView\Redis\RedisCli::usePrefix()->keys('*');
print_r($r);