随心的博客

好记性不如个烂笔头,随心记录!

返回顶部
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
摘要: windows平台安装 git 安装包下载地址:https://gitforwindows.org/ 官网慢,可以用国内的镜像:https://npm.taobao.org/mirrors/git-for-windows 下载后打开bash 输入 git --version 看是否有输出版本 lin 阅读全文
posted @ 2021-12-01 16:58 yangphp 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 一、下载安装 wget http://download.redis.io/releases/redis-4.0.1.tar.gz tar xzf redis-4.0.1.tar.gz cd redis-4.0.1 make 二、运行 Redis服务 # src/redis-server redis. 阅读全文
posted @ 2021-11-30 15:00 yangphp 阅读(718) 评论(0) 推荐(0) 编辑
摘要: 1、github地址: https://github.com/microsoftarchive/redis 2、下载Redis-x64-3.0.504.msi并安装 3、进入redis安装目录,运行 redis-cli.exe keys * #获取所有的键 get key #获取某个键的值 4、进入 阅读全文
posted @ 2021-11-30 14:58 yangphp 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 安装Git #使用dnf工具: dnf install git-all #查看Git版本 git --version 提示:git version 2.27.0 安装Composer 说明:是 PHP 用来管理依赖(dependency)关系的工具。你可以在自己的项目中声明所依赖的外部工具库(lib 阅读全文
posted @ 2021-11-06 11:16 yangphp 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 一、临时关闭防火墙 #查看防火墙状态 systemctl status firewalld 如果Active后面是 inactive 表示已经是关闭状态了 #开启状态下临时关闭防火墙 systemctl stop firewalld #永久关闭防火墙 systemctl disable firewa 阅读全文
posted @ 2021-11-06 11:14 yangphp 阅读(138) 评论(0) 推荐(0) 编辑
摘要: TP6中缓存的使用 使用缓存,需引入 cache类 use think\facade\Cache; 缓存配置:config/cache.php return [ 'default' => 'file', 'stores' => [ // 文件缓存 'file' => [ // 驱动方式 'type' 阅读全文
posted @ 2021-11-05 15:32 yangphp 阅读(2796) 评论(0) 推荐(0) 编辑
摘要: TP6中命令行操作 1、启动内置服务器 php think run //指定IP和端口 php think run -H tp.com -p 80 2、查看当前版本 php think version 3、快速生成应用 php think build demo 4、快速生成控制器 //生成index 阅读全文
posted @ 2021-11-05 15:30 yangphp 阅读(941) 评论(0) 推荐(0) 编辑
摘要: TP6中请求的使用 一、请求的使用 //1、引入Request对象 use think\facade\Request; //方式1、构造方法注入 protected $request; public function __construct(Request $request) { $this->re 阅读全文
posted @ 2021-11-05 13:22 yangphp 阅读(1820) 评论(0) 推荐(0) 编辑
摘要: TP6模型操作 数据库的所有查询构造器方法模型中都可以支持,可以定义自己的方法, 所以也可以把模型看成是数据库的增强版 一、模型的定义 <?php namespace app\model; use think\Model; class UserModel extends Model { protec 阅读全文
posted @ 2021-11-05 13:13 yangphp 阅读(1500) 评论(0) 推荐(0) 编辑
摘要: TP6中数据库操作 要使用Db类必须使用门面方式(think\facade\Db)调用 use think\facade\Db; 一、数据库连接配置 配置文件位于,config/database.php 或者开发环境 位于根目录下的 .env 文件 APP_DEBUG = true [APP] DE 阅读全文
posted @ 2021-11-04 17:06 yangphp 阅读(4394) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页