PHP code example of hollodotme / readis
1. Go to this page and download the library: Download hollodotme/readis 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/ */
hollodotme / readis example snippets
return [
'baseUrl' => 'http://readis.example.com',
];
return [
'baseUrl' => 'http://www.example.com/readis',
];
return [
[
'name' => 'Local redis server 1',
'host' => '127.0.0.1',
'port' => 6379,
'timeout' => 2.5,
'retryInterval' => 100,
'auth' => null,
'databaseMap' => [
'0' => 'Sessions',
'1' => 'Sample Data',
// ...
],
],
/*
[
'name' => 'Local redis server 2',
'host' => '127.0.0.2',
'port' => 6379,
'timeout' => 2.5,
'retryInterval' => 100,
'auth' => null,
'databaseMap' => [
'0' => 'Sessions',
'1' => 'Sample Data',
// ...
],
],
*/
];
nginx
server {
listen 80;
# Change the domain name
server_name www.your-domain.net;
root /var/www/readis/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;