Hello everyone,
I am really new to programming in general and to php in particular. I am trying to implement what looks like a very simple code for redisent with php. But when I run redis 127.0.0.1:6379> keys *2 (from my ubuntu terminal), I keep getting empty set. Here is the code (which I found on this wenbsite: https://github.com/jdp/redisent):
require_once ‘redisent/Redis.php’;
$redis = new redisent\Redis(‘redis://localhost’);
$redis->set(‘awesome’, ‘absolutely’);
echo "Is Redisent awesome? ", $redis->get(‘awesome’), “\n”;
I suspect the problem to be the location of redis.php. It is in the root directory of apache2 so that when I type in my browser http://localhost/redis.php it could execute, but it is just showing me the original php code. Any help with some explanation please.