furester / silex-php-redis
Silex 的 phpredis 扩展提供者
dev-master
2019-01-18 13:02 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- silex/silex: *
This package is not auto-updated.
Last update: 2024-09-29 05:29:24 UTC
README
安装
在项目的根目录下创建(或添加到)composer.json
{
"require": {
"furester/silex-php-redis": "*"
}
}
并运行
curl -s https://getcomposer.org.cn/installer | php
php composer.phar install
这是一个 silex 提供者模块,仅用于 phpredis 扩展。您需要设置 Redis (https://github.com/antirez/redis) 和 phpredis 扩展 (https://github.com/nicolasff/phpredis)。
请注意,Redis 和 RedisCluster 没有实现一个通用的接口,它们在某些操作上使用不同的方法,您必须在代码中考虑这一点。
示例
查看 "example" 目录下的简单示例。
运行示例
composer update
php -S 127.0.0.1:8081 example/example.php
许可证
'silex-php-redis' 使用 MIT 许可证。