thinkphp5如何使用redis?
1.设置应用配置文件config.php
type可以是很多分类File、Redis等等。
相关推荐:《ThinkPHP教程》
2.thinkphp5使用redis
新建application/index/controller/index.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
3.前端显示
新建application/index/view/index.html
1 2 3 4 5 6 7 8 9 10 |
|
输出:
1 |
|
PS:使用redis,注意开启redis服务器。
Atas ialah kandungan terperinci thinkphp redis用法是什么. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!