定制 xiucaiwu/tp5redis 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xiucaiwu/tp5redis

Composer 安装命令:

composer require xiucaiwu/tp5redis

包简介

The ThinkPHP5 Redis Classes

README 文档

README

tp5下的Redis操作类,对原Redis的二次封装,支持编辑器识别

安装

composer require "xiucaiwu/tp5redis:1.0.*"

配置

tp5.0

config.php
'redis'                  => [
	'host' => '127.0.0.1', // redis主机
	'port' => '', // redis端口
	'password' => '', // 密码
	'select' => 0, // 操作库
	'expire' => 0, // 有效期(秒)
	'timeout' => 0, // 超时时间(秒)
	'persistent' => true, // 是否长连接
	'prefix' => '', //前缀
]

tp5.1

config/redis.php
return [
	'host' => '127.0.0.1', // redis主机
	'port' => '', // redis端口
	'password' => '', // 密码
	'select' => 0, // 操作库
	'expire' => 0, // 有效期(秒)
	'timeout' => 0, // 超时时间(秒)
	'persistent' => true, // 是否长连接
	'prefix' => '', //前缀
];

例子

<?php
	namespace app\index\controller;
	use tp5redis\Redis;

	class index
	{
		public function test()
		{
			  Redis::set('abc',111);
			  $res = Redis::get('abc');
			  var_dump($res);  //输出111代表成功
		}
	}

统计信息

  • 总下载量: 608
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固