Skip to content

Commit

Permalink
支持ThinkPHP6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edward1108 committed Oct 30, 2020
1 parent 14024a5 commit c9e0b9d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 25 deletions.
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,45 @@ ThinkPHP6.0.x 和 ThinkPHP5.1.x
```
config/redis.php
return [
'host' => '127.0.0.1', // redis主机
'port' => '', // redis端口
'password' => '', // 密码
'select' => 0, // 操作库
'expire' => 0, // 有效期(秒)
'timeout' => 0, // 超时时间(秒)
'persistent' => true, // 是否长连接
'prefix' => '', //前缀
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存,单位:秒
'expire' => 0,
// redis主机
'host' => '127.0.0.1',
// redis端口
'port' => '',
// 密码
'password' => '',
// 操作库
'select' => 0,
// 超时时间(秒)
'timeout' => 0,
// 是否长连接
'persistent' => false,
];
```

ThinkPHP5.0.x
```
config.php
'redis' => [
'host' => '127.0.0.1', // redis主机
'port' => '', // redis端口
'password' => '', // 密码
'select' => 0, // 操作库
'expire' => 0, // 有效期(秒)
'timeout' => 0, // 超时时间(秒)
'persistent' => true, // 是否长连接
'prefix' => '', //前缀
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存,单位:秒
'expire' => 0,
// redis主机
'host' => '127.0.0.1',
// redis端口
'port' => '',
// 密码
'password' => '',
// 操作库
'select' => 0,
// 超时时间(秒)
'timeout' => 0,
// 是否长连接
'persistent' => false,
]
```

Expand Down
26 changes: 17 additions & 9 deletions src/config.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<?php
// +----------------------------------------------------------------------
// | Captcha配置文件
// | Redis配置文件
// +----------------------------------------------------------------------

return [
'host' => '127.0.0.1', // redis主机
'port' => '', // redis端口
'password' => '', // 密码
'select' => 0, // 操作库
'expire' => 0, // 有效期(秒)
'timeout' => 0, // 超时时间(秒)
'persistent' => true, // 是否长连接
'prefix' => '', //前缀
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存,单位:秒
'expire' => 0,
// redis主机
'host' => '127.0.0.1',
// redis端口
'port' => '',
// 密码
'password' => '',
// 操作库
'select' => 0,
// 超时时间(秒)
'timeout' => 0,
// 是否长连接
'persistent' => false,
];

0 comments on commit c9e0b9d

Please sign in to comment.