Paste_Image.png
https://github.com/phpredis/phpredis
连接前确定是否启动redis
/usr/local/bin/redis-server /home/tong3/config/redis/redis.conf
connect.php
<?php
$redis=new \Redis();
$redis->connect("127.0.0.1",7200);
?>
php connect.php
Paste_Image.png