给自己留个坑,免得下次需要时找不到
<?php $redis = new Redis(); //Connecting to Redis $redis->connect('hostname', port); $redis->auth('password'); if ($redis->ping()) { echo "PONG"; } ?>
命令行
redis-cli -h 127.0.0.1 -p 6379 -a ‘thisizmy!PASS’
The post Redis测试PHP代码 appeared first on VPS小组.
转载请注明:逗比根据地 » Redis测试PHP代码