我试图让(p)redis运行但是只要我添加一个set->就无法连接到redis
require "predis/autoload.php";
Predis\Autoloader::register();
try {
$redis = new Predis\Client();
$redis->set("hello_world", "Hi from php!");
$value = $redis->get("hello_world");
var_dump($value);
echo "Successfully connected to Redis";
}
但是
时它可以连接到Redisrequire "predis/autoload.php";
Predis\Autoloader::register();
try {
$redis = new Predis\Client();
var_dump($redis);
echo "Successfully connected to Redis";
}
任何提示?