简体   繁体   中英

Redis in PHP: keys “*”

I have searched the Internet up and down, but couldn't find the command how to get all keys from Redis db in php.

Example: $redis->connect $redis->hset

When I type keys "*" in redis-cli, I get all the keys which are stored in db.

Output:

tenshi@mashiro:~$ redis-cli 127.0.0.1:6379> keys * 1) "Testserver" 2) "testserver" 3) "Server5"

Now I want the similar command in php.

如果您使用PHP扩展程序进行redis ,则命令为$redis->keys('*')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM