/ Published in: PHP
Will try and connect via php-redis, and will fall back to Predis if it can not find php-redis
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $redis = new Redis(); $redis->connect(R_HOST, R_PORT, 2.5); if(R_PASS) $redis->auth(R_PASS); $redis->select(R_DATA); } else { require './Predis/Predis.php'; 'host' => R_HOST, 'port' => R_POST, 'database' => R_DATA, 'password' => R_PASS )); } ?>