phpredis 扩展有 phpinfo()能看扩展信息,问题是这样的:
我学了个测试代码:    //连接本地的 Redis 服务
   $redis = new Redis();
   $redis->connect('127.0.0.1', 6379);
   echo "Connection to server sucessfully";
   //存储数据到列表中
   $redis->lpush("tutorial-list", "Redis");
   $redis->lpush("tutorial-list", "Mongodb");
   $redis->lpush("tutorial-list", "Mysql");
   // 获取存储的数据并输出
   $arList = $redis->lrange("tutorial-list", 0 ,5);
   echo "Stored string in redis";
   print_r($arList);用系统中 php 去执行是可以的用nginx去执行确只能输出 Connection to server sucessfully 没有查到错误信息,nginx访问 php文件 phpinfo()明明有redis扩展,实在想不明白