# TP6文档
请求变量
```
<pre class="calibre14">```
use think\facade\Request<span class="token2">;</span>
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">param</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">param</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>全部请求变量 返回数组
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">param</span><span class="token2">(</span><span class="token2">[</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token4">'email'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> 多个变量
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">param</span><span class="token2">(</span><span class="token4">'a'</span><span class="token2">,</span><span class="token4">'1'</span><span class="token2">)</span> $a不存在使用默认值<span class="token3">1</span>
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">param</span><span class="token2">(</span><span class="token4">'username'</span><span class="token2">,</span><span class="token4">''</span><span class="token2">,</span><span class="token4">'strip_tags'</span><span class="token2">)</span><span class="token2">;</span> 参数过滤 去掉html标签 htmlspecialchars转换成实体入库 strtolower小写
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">header</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> 请求头数组<span class="token2">,</span>支持单个 cookie
<span class="token1">input</span><span class="token2">(</span><span class="token4">"name"</span><span class="token2">)</span><span class="token2">;</span>
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">session</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>获取 $_SESSION 变量
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">cookie</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>获取 $_COOKIE 变量
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">server</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>获取 $_SERVER 变量
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">env</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>返回env数组
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">file</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>获取 $_FILES 变量
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">baseUrl</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> <span class="token">/</span>index<span class="token">/</span>index
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">host</span><span class="token2">(</span><span class="token3">true</span><span class="token2">)</span><span class="token2">;</span> 域名<span class="token2">:</span>www<span class="token2">.</span>baidu<span class="token2">.</span>com<span class="token2">,</span>默认无参数包含端口<span class="token2">:</span><span class="token3">80</span>
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">url</span><span class="token2">(</span><span class="token3">1</span><span class="token2">)</span><span class="token2">;</span> 完整域名和地址 http<span class="token2">:</span><span class="token">/</span><span class="token">/</span>tp6<span class="token2">.</span>api<span class="token2">.</span>shanliwawa<span class="token2">.</span>top<span class="token2">:</span><span class="token3">80</span><span class="token">/</span>index<span class="token">/</span>index
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">domain</span><span class="token2">(</span><span class="token3">1</span><span class="token2">)</span> http<span class="token2">:</span><span class="token">/</span><span class="token">/</span>tp6<span class="token2">.</span>api<span class="token2">.</span>shanliwawa<span class="token2">.</span>top
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">time</span><span class="token2">(</span><span class="token2">)</span> 请求时间戳
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">app</span><span class="token2">(</span><span class="token2">)</span> 应用名 index
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">controller</span><span class="token2">(</span><span class="token2">)</span> 控制器 Index 参数<span class="token3">true</span>小写
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">action</span><span class="token2">(</span><span class="token2">)</span> 操作 index 参数<span class="token3">true</span> 小写
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">method</span><span class="token2">(</span><span class="token3">true</span><span class="token2">)</span><span class="token2">;</span> 请求类型获取 GET
isGet isPost isPut isDelete isAjax isMobile isHead 判断是否某种类型
Request<span class="token2">:</span><span class="token2">:</span><span class="token1">has</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span><span class="token4">'get'</span><span class="token2">)</span><span class="token2">;</span> 检测变量id是否存在
<span class="token1">url</span><span class="token2">(</span><span class="token4">'index/hello'</span><span class="token2">,</span> <span class="token2">[</span><span class="token4">'id'</span><span class="token">=</span><span class="token">></span><span class="token3">5</span><span class="token2">,</span><span class="token4">'name'</span><span class="token">=</span><span class="token">></span><span class="token4">'李白'</span><span class="token2">]</span><span class="token2">,</span><span class="token4">'do'</span><span class="token2">)</span><span class="token2">;</span> http<span class="token2">:</span><span class="token">/</span><span class="token">/</span>tp6<span class="token2">.</span>api<span class="token2">.</span>shanliwawa<span class="token2">.</span>top<span class="token">/</span>index<span class="token">/</span>hello<span class="token">/</span>李白<span class="token2">.</span><span class="token5">do</span><span class="token">?</span>id<span class="token">=</span><span class="token3">5</span>
<span class="token1">url</span><span class="token2">(</span><span class="token4">'index/hello#aa'</span><span class="token2">)</span><span class="token2">;</span> 锚点
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">set</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> $value<span class="token2">,</span> <span class="token3">3600</span><span class="token2">)</span><span class="token2">;</span> <span class="token3">1</span>小时后过期
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">get</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span> 获取缓存
多缓存类型配置
<span class="token5">return</span> <span class="token2">[</span>
<span class="token6">// 缓存类型为File</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'redis'</span><span class="token2">,</span>
<span class="token6">// 全局缓存有效期(0为永久有效)</span>
<span class="token2">,</span>开发下一定要设置<span class="token">-</span><span class="token3">1</span> 否在刷新后 还在
<span class="token4">'expire'</span><span class="token">=</span><span class="token">></span> <span class="token">-</span><span class="token3">1</span><span class="token2">,</span>
<span class="token6">// 缓存前缀</span>
<span class="token4">'prefix'</span><span class="token">=</span><span class="token">></span> <span class="token4">'think'</span><span class="token2">,</span>
<span class="token6">// 缓存目录</span>
<span class="token4">'host'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'127.0.0.1'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">;</span>
<span class="token5">return</span> <span class="token2">[</span>
<span class="token6">// 使用复合缓存类型</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'complex'</span><span class="token2">,</span>
<span class="token6">// 默认使用的缓存</span>
<span class="token4">'default'</span> <span class="token">=</span><span class="token">></span> <span class="token2">[</span>
<span class="token6">// 驱动方式</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'file'</span><span class="token2">,</span>
<span class="token6">// 缓存保存目录</span>
<span class="token4">'path'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'../runtime/default'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">,</span>
<span class="token6">// 文件缓存</span>
<span class="token4">'file'</span> <span class="token">=</span><span class="token">></span> <span class="token2">[</span>
<span class="token6">// 驱动方式</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'file'</span><span class="token2">,</span>
<span class="token6">// 设置不同的缓存保存目录</span>
<span class="token4">'path'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'../runtime/file/'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">,</span>
<span class="token6">// redis缓存</span>
<span class="token4">'redis'</span> <span class="token">=</span><span class="token">></span> <span class="token2">[</span>
<span class="token6">// 驱动方式</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'redis'</span><span class="token2">,</span>
<span class="token6">// 服务器地址</span>
<span class="token4">'host'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'127.0.0.1'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">;</span>
use think\facade\Cache<span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">store</span><span class="token2">(</span><span class="token4">'file'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">set</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span><span class="token4">'123'</span><span class="token2">,</span><span class="token3">0</span><span class="token2">)</span><span class="token2">;</span>
$v <span class="token">=</span> Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">store</span><span class="token2">(</span><span class="token4">'redis'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">get</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">store</span><span class="token2">(</span><span class="token4">'default'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">get</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>文件缓存
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">delete</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">clear</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">set</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token2">[</span><span class="token3">1</span><span class="token2">,</span><span class="token3">2</span><span class="token2">,</span><span class="token3">3</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">push</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token3">4</span><span class="token2">)</span><span class="token2">;</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">remember</span><span class="token2">(</span><span class="token4">'start_time'</span><span class="token2">,</span> <span class="token1">time</span><span class="token2">(</span><span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> 不存在则创建
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">inc</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token2">;</span> 自增<span class="token3">1</span>
Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">dec</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token2">;</span> 自减<span class="token3">1</span>
$redis <span class="token">=</span> Cache<span class="token2">:</span><span class="token2">:</span><span class="token1">handler</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> redis对象
配置redis session
<span class="token5">return</span> <span class="token2">[</span>
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'redis'</span><span class="token2">,</span>
<span class="token4">'prefix'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'think'</span><span class="token2">,</span>
<span class="token4">'auto_start'</span> <span class="token">=</span><span class="token">></span> <span class="token3">true</span><span class="token2">,</span>
<span class="token6">// redis主机</span>
<span class="token4">'host'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'127.0.0.1'</span><span class="token2">,</span>
<span class="token6">// redis端口</span>
<span class="token4">'port'</span> <span class="token">=</span><span class="token">></span> <span class="token3">6379</span><span class="token2">,</span>
<span class="token6">// 密码</span>
<span class="token4">'password'</span> <span class="token">=</span><span class="token">></span> <span class="token4">''</span><span class="token2">,</span>
<span class="token2">]</span>
<span class="token1">session</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token2">[</span><span class="token4">'thinkphp'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> 设置支持字符串 数组
<span class="token1">session</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>获取
<span class="token1">session</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token5">null</span><span class="token2">)</span><span class="token2">;</span>删除
<span class="token1">session</span><span class="token2">(</span><span class="token5">null</span><span class="token2">)</span><span class="token2">;</span>清空
<span class="token1">cookie</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token4">'value'</span><span class="token2">,</span> <span class="token3">3600</span><span class="token2">)</span><span class="token2">;</span>
设置不支持数组<span class="token2">,</span>序列化后存储
<span class="token1">cookie</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span>
<span class="token1">cookie</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">,</span> <span class="token5">null</span><span class="token2">)</span><span class="token2">;</span>
<span class="token1">cookie</span><span class="token2">(</span><span class="token4">'think_lang'</span><span class="token2">,</span><span class="token4">'en-us'</span><span class="token2">)</span><span class="token2">;</span><span class="token6">//设置语言类型</span>
<span class="token1">lang</span><span class="token2">(</span><span class="token4">'add user error'</span><span class="token2">)</span><span class="token2">;</span><span class="token6">//翻译</span>
<span class="token1">config</span><span class="token2">(</span><span class="token4">'cache.type'</span><span class="token2">)</span> 读取配置
```
```
验证
```
<pre class="calibre14">```
<span class="token2">{</span><span class="token2">:</span><span class="token1">token_field</span><span class="token2">(</span><span class="token2">)</span><span class="token2">}</span> 模板中输出令牌
<span class="token2">{</span><span class="token2">:</span><span class="token1">token_meta</span><span class="token2">(</span><span class="token2">)</span><span class="token2">}</span> ajax提交
$<span class="token2">.</span><span class="token1">ajaxSetup</span><span class="token2">(</span><span class="token2">{</span>
headers<span class="token2">:</span> <span class="token2">{</span>
<span class="token4">'X-CSRF-TOKEN'</span><span class="token2">:</span> $<span class="token2">(</span><span class="token4">'meta[name="csrf-token"]'</span><span class="token2">)</span><span class="token2">.</span><span class="token1">attr</span><span class="token2">(</span><span class="token4">'content'</span><span class="token2">)</span>
<span class="token2">}</span>
<span class="token2">}</span><span class="token2">)</span><span class="token2">;</span>
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">post</span><span class="token2">(</span><span class="token4">'blog/save'</span><span class="token2">,</span><span class="token4">'blog/save'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">token</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> 路由中使用验证
think\facade\Validate
$rule <span class="token">=</span> <span class="token2">[</span>
<span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'require|max:25'</span><span class="token2">,</span>
<span class="token4">'age'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'number|between:1,120'</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'email'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">;</span>
$msg <span class="token">=</span> <span class="token2">[</span>
<span class="token4">'name.require'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'名称必须'</span><span class="token2">,</span>
<span class="token4">'name.max'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'名称最多不能超过25个字符'</span><span class="token2">,</span>
<span class="token4">'age.number'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'年龄必须是数字'</span><span class="token2">,</span>
<span class="token4">'age.between'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'年龄只能在1-120之间'</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'邮箱格式错误'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">;</span>
$data <span class="token">=</span> <span class="token2">[</span>
<span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp'</span><span class="token2">,</span>
<span class="token4">'age'</span> <span class="token">=</span><span class="token">></span> <span class="token3">10</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp@qq.com'</span><span class="token2">,</span>
<span class="token2">]</span><span class="token2">;</span>
$validate <span class="token">=</span> Validate<span class="token2">:</span><span class="token2">:</span><span class="token1">rule</span><span class="token2">(</span>$rule<span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">message</span><span class="token2">(</span>$msg<span class="token2">)</span><span class="token2">;</span>
$result <span class="token">=</span> $validate<span class="token">-</span><span class="token">></span><span class="token1">check</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span>
<span class="token5">if</span><span class="token2">(</span><span class="token">!</span>$result<span class="token2">)</span> <span class="token2">{</span>
<span class="token1">dump</span><span class="token2">(</span>$validate<span class="token">-</span><span class="token">></span><span class="token1">getError</span><span class="token2">(</span><span class="token2">)</span><span class="token2">)</span><span class="token2">;</span>
<span class="token2">}</span>
```
```
路由
```
<pre class="calibre14">```
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">get</span><span class="token2">(</span><span class="token4">'new/<id>'</span><span class="token2">,</span><span class="token4">'News/read'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">// 定义GET请求路由规则</span>
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">post</span><span class="token2">(</span><span class="token4">'new/<id>'</span><span class="token2">,</span><span class="token4">'News/update'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">// 定义POST请求路由规则</span>
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">put</span><span class="token2">(</span><span class="token4">'new/:id'</span><span class="token2">,</span><span class="token4">'News/update'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">// 定义PUT请求路由规则</span>
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">delete</span><span class="token2">(</span><span class="token4">'new/:id'</span><span class="token2">,</span><span class="token4">'News/delete'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">// 定义DELETE请求路由规则</span>
Route<span class="token2">:</span><span class="token2">:</span><span class="token1">any</span><span class="token2">(</span><span class="token4">'new/:id'</span><span class="token2">,</span><span class="token4">'News/read'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">// 所有请求都支持的路由规则</span>
<span class="token">-</span><span class="token">></span><span class="token1">allowCrossDomain</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>跨域
```
```
输出响应
```
<pre class="calibre14">```
$data<span class="token">=</span><span class="token2">[</span><span class="token4">'code'</span><span class="token">=</span><span class="token">></span><span class="token3">200</span><span class="token2">,</span><span class="token4">'msg'</span><span class="token">=</span><span class="token">></span><span class="token4">'信息提示'</span><span class="token2">,</span><span class="token4">'list'</span><span class="token">=</span><span class="token">></span><span class="token2">[</span><span class="token4">'中国'</span><span class="token2">]</span><span class="token2">]</span><span class="token2">;</span>
<span class="token1">json</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span>
<span class="token1">jsonp</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span>
<span class="token1">xml</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span>
<span class="token1">redirect</span><span class="token2">(</span><span class="token4">'http://www.thinkphp.cn'</span><span class="token2">)</span><span class="token2">;</span>
<span class="token1">redirect</span><span class="token2">(</span><span class="token4">'/index/hello/name'</span><span class="token2">)</span><span class="token2">;</span> <span class="token6">//站内跳转</span>
<span class="token1">download</span><span class="token2">(</span><span class="token4">'./static/2.xlsx'</span><span class="token2">)</span><span class="token2">;</span> 下载
```
```
数据库
```
<pre class="calibre14">```
use think\facade\Db<span class="token2">;</span>
$rs <span class="token">=</span>Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">find</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> 查询一条记录 name不含前缀
$rs <span class="token">=</span>Db<span class="token2">:</span><span class="token2">:</span><span class="token1">table</span><span class="token2">(</span><span class="token4">'ims_user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'sex'</span><span class="token2">,</span> <span class="token3">2</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">select</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> 多条数据 table含前缀
$rs1 <span class="token">=</span>Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span> <span class="token3">1</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">value</span><span class="token2">(</span><span class="token4">'name'</span><span class="token2">)</span><span class="token2">;</span> 查询某个字段值
$rs <span class="token">=</span>Db<span class="token2">:</span><span class="token2">:</span><span class="token1">table</span><span class="token2">(</span><span class="token4">'ims_user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'sex'</span><span class="token2">,</span> <span class="token3">2</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">column</span><span class="token2">(</span><span class="token4">'name,id'</span><span class="token2">,</span><span class="token4">'id'</span><span class="token2">)</span><span class="token2">;</span> 返回name<span class="token2">,</span>id列<span class="token2">,</span>后面是key
$userId <span class="token">=</span> Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">insertGetId</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span><span class="token6">//插入数据返回id</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span>
<span class="token">-</span><span class="token">></span><span class="token1">limit</span><span class="token2">(</span><span class="token3">100</span><span class="token2">)</span>
<span class="token">-</span><span class="token">></span><span class="token1">insertAll</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">;</span> 插入多条数据<span class="token2">,</span>分每次<span class="token3">100</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span>
<span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span> <span class="token3">1</span><span class="token2">)</span>
<span class="token">-</span><span class="token">></span><span class="token1">update</span><span class="token2">(</span><span class="token2">[</span><span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp'</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span> 更新
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">table</span><span class="token2">(</span><span class="token4">'think_user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">delete</span><span class="token2">(</span><span class="token3">1</span><span class="token2">)</span><span class="token2">;</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">table</span><span class="token2">(</span><span class="token4">'think_user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">delete</span><span class="token2">(</span><span class="token2">[</span><span class="token3">1</span><span class="token2">,</span><span class="token3">2</span><span class="token2">,</span><span class="token3">3</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">table</span><span class="token2">(</span><span class="token4">'think_user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">delete</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">delete</span><span class="token2">(</span><span class="token3">true</span><span class="token2">)</span><span class="token2">;</span><span class="token6">//清空数据</span>
<span class="token1">where</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">,</span><span class="token4">'<>'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span> 不等于<span class="token3">1</span> <span class="token">></span> <span class="token">>=</span> like
<span class="token1">where</span><span class="token2">(</span><span class="token4">"id=:id and username=:name"</span><span class="token2">,</span> <span class="token2">[</span><span class="token4">'id'</span> <span class="token">=</span><span class="token">></span> <span class="token3">1</span> <span class="token2">,</span> <span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp'</span><span class="token2">]</span><span class="token2">)</span>
<span class="token1">field</span><span class="token2">(</span><span class="token4">'id,title,content'</span><span class="token2">)</span> 指定字段
<span class="token1">limit</span><span class="token2">(</span><span class="token3">10</span><span class="token2">,</span><span class="token3">25</span><span class="token2">)</span> 第十条开始<span class="token3">25</span>条 单数字返回数据条数
<span class="token1">page</span><span class="token2">(</span><span class="token3">1</span><span class="token2">,</span><span class="token3">10</span><span class="token2">)</span> 第一页十条
<span class="token1">order</span><span class="token2">(</span><span class="token2">[</span><span class="token4">'id'</span><span class="token">=</span><span class="token">></span><span class="token4">'desc'</span><span class="token2">,</span><span class="token4">'sex'</span><span class="token">=</span><span class="token">></span><span class="token4">'desc'</span><span class="token2">]</span><span class="token2">)</span> 排序
<span class="token1">group</span><span class="token2">(</span><span class="token4">'user_id,test_time'</span><span class="token2">)</span> 分组
<span class="token1">count</span><span class="token2">(</span><span class="token2">)</span> <span class="token1">max</span><span class="token2">(</span><span class="token4">'id'</span><span class="token2">)</span> <span class="token1">min</span><span class="token2">(</span><span class="token2">)</span> <span class="token1">avg</span><span class="token2">(</span><span class="token2">)</span> <span class="token1">sum</span><span class="token2">(</span><span class="token2">)</span> 聚合函数
<span class="token1">whereTime</span><span class="token2">(</span><span class="token4">'birthday'</span><span class="token2">,</span> <span class="token4">'>='</span><span class="token2">,</span> <span class="token4">'1970-10-1'</span><span class="token2">)</span> 支持<span class="token"><</span> <span class="token">=</span>
<span class="token1">whereTime</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">,</span><span class="token4">'-2 hours'</span><span class="token2">)</span> 查询<span class="token3">2</span>小时
<span class="token1">whereBetweenTime</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">,</span> <span class="token4">'2017-01-01'</span><span class="token2">,</span> <span class="token4">'2017-06-30'</span><span class="token2">)</span> 查询时间段
<span class="token1">whereYear</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">)</span> 今年 <span class="token1">whereYear</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">,</span><span class="token4">'2018'</span><span class="token2">)</span> last year 去年
<span class="token1">whereMonth</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">)</span> last month上月 <span class="token3">2018</span><span class="token">-</span><span class="token3">06</span> 具体月份
<span class="token1">whereWeek</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">)</span> last week 上周
<span class="token1">whereDay</span><span class="token2">(</span><span class="token4">'create_time'</span><span class="token2">)</span>今天 yesterday昨天 <span class="token3">2018</span><span class="token">-</span><span class="token3">11</span><span class="token">-</span><span class="token3">1</span>具体
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">query</span><span class="token2">(</span><span class="token4">"select * from think_user where status=1"</span><span class="token2">)</span><span class="token2">;</span> 原生查询
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">execute</span><span class="token2">(</span><span class="token4">"update think_user set name='thinkphp' where status=1"</span><span class="token2">)</span><span class="token2">;</span><span class="token6">//更新插入删除</span>
Db<span class="token2">:</span><span class="token2">:</span><span class="token1">query</span><span class="token2">(</span><span class="token4">"select * from think_user where id=? AND status=?"</span><span class="token2">,</span> <span class="token2">[</span><span class="token3">8</span><span class="token2">,</span> <span class="token3">1</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span><span class="token6">//绑定</span>
$list <span class="token">=</span> Db<span class="token2">:</span><span class="token2">:</span><span class="token1">name</span><span class="token2">(</span><span class="token4">'user'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">where</span><span class="token2">(</span><span class="token4">'status'</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">paginate</span><span class="token2">(</span><span class="token3">10</span><span class="token2">)</span><span class="token2">;</span> 分页每页<span class="token3">10</span>条
```
```
模型
定义全局常量
```
<pre class="calibre14">```
<span class="token1">define</span><span class="token2">(</span><span class="token4">'__URL__'</span><span class="token2">,</span>\think\facade\Request<span class="token2">:</span><span class="token2">:</span><span class="token1">domain</span><span class="token2">(</span><span class="token3">1</span><span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> http<span class="token2">:</span><span class="token">/</span><span class="token">/</span>tp6<span class="token2">.</span>api<span class="token2">.</span>shanliwawa<span class="token2">.</span>top
<span class="token1">define</span><span class="token2">(</span><span class="token4">'__ROOT__'</span><span class="token2">,</span>\think\facade\app<span class="token2">:</span><span class="token2">:</span><span class="token1">getRootPath</span><span class="token2">(</span><span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> 系统根目录 C<span class="token2">:</span>\www\tp6\
<span class="token1">define</span><span class="token2">(</span><span class="token4">"PRE"</span><span class="token2">,</span><span class="token1">config</span><span class="token2">(</span><span class="token4">'database.prefix'</span><span class="token2">)</span><span class="token2">)</span><span class="token2">;</span> 表前缀
```
```
绝对路径获取
```
<pre class="calibre14">```
\think\facade\app<span class="token2">:</span><span class="token2">:</span><span class="token1">getRootPath</span><span class="token2">(</span><span class="token2">)</span> 根目录C<span class="token2">:</span>\www\tp6\
\think\facade\app<span class="token2">:</span><span class="token2">:</span><span class="token1">getAppPath</span><span class="token2">(</span><span class="token2">)</span> 应用路径 C<span class="token2">:</span>\www\tp6\app\index\
\think\facade\app<span class="token2">:</span><span class="token2">:</span><span class="token1">getConfigPath</span><span class="token2">(</span><span class="token2">)</span> 配置路径C<span class="token2">:</span>\www\tp6\config\
\think\facade\app<span class="token2">:</span><span class="token2">:</span><span class="token1">version</span><span class="token2">(</span><span class="token2">)</span> 核心版本
```
```
模板视图
```
<pre class="calibre14">```
use think\facade\View<span class="token2">;</span>
View<span class="token2">:</span><span class="token2">:</span><span class="token1">assign</span><span class="token2">(</span><span class="token2">[</span>
<span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'ThinkPHP'</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp@qq.com'</span>
<span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
View<span class="token2">:</span><span class="token2">:</span><span class="token1">assign</span><span class="token2">(</span><span class="token4">'data'</span><span class="token2">,</span><span class="token2">[</span>
<span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'ThinkPHP'</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp@qq.com'</span>
<span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
View<span class="token2">:</span><span class="token2">:</span><span class="token1">fetch</span><span class="token2">(</span><span class="token4">'index'</span><span class="token2">)</span><span class="token2">;</span>
助手函数
<span class="token1">view</span><span class="token2">(</span><span class="token4">'index'</span><span class="token2">,</span> <span class="token2">[</span>
<span class="token4">'name'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'ThinkPHP'</span><span class="token2">,</span>
<span class="token4">'email'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'thinkphp@qq.com'</span>
<span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
模板输出
<span class="token2">{</span>$name<span class="token2">}</span>
<span class="token2">{</span>$data<span class="token2">.</span>name<span class="token2">}</span> 等价 <span class="token2">{</span>$data<span class="token2">[</span><span class="token4">'name'</span><span class="token2">]</span><span class="token2">}</span>
<span class="token2">{</span><span class="token2">:</span><span class="token1">dump</span><span class="token2">(</span>$data<span class="token2">)</span><span class="token2">}</span> 使用函数 <span class="token2">:</span>开头
<span class="token2">{</span>$user<span class="token2">.</span>nickname<span class="token">|</span>default<span class="token">=</span><span class="token4">"这家伙很懒,什么也没留下"</span><span class="token2">}</span>
<span class="token2">{</span>$Think<span class="token2">.</span>cookie<span class="token2">.</span>name<span class="token2">}</span> <span class="token6">// 输出$_COOKIE['name']变量</span>
<span class="token2">{</span>$Think<span class="token2">.</span>server<span class="token2">.</span>script_name<span class="token2">}</span> <span class="token6">// 输出$_SERVER['SCRIPT_NAME']变量</span>
<span class="token2">{</span>$Think<span class="token2">.</span>session<span class="token2">.</span>user_id<span class="token2">}</span> <span class="token6">// 输出$_SESSION['user_id']变量</span>
<span class="token2">{</span>$Think<span class="token2">.</span>get<span class="token2">.</span>page<span class="token2">}</span> <span class="token6">// 输出$_GET['page']变量</span>
<span class="token2">{</span>$Request<span class="token2">.</span>param<span class="token2">.</span>name<span class="token2">}</span> 获取name
<span class="token2">{</span>$data<span class="token2">.</span>name<span class="token">|</span>raw<span class="token2">}</span> 不转义输出
<span class="token2">{</span>$data<span class="token2">.</span>create_time<span class="token">|</span>date<span class="token">=</span><span class="token4">'Y-m-d H:i'</span><span class="token2">}</span>
<span class="token2">{</span>literal<span class="token2">}</span>
Hello<span class="token2">,</span><span class="token2">{</span>$name<span class="token2">}</span>!
原样输出
<span class="token2">{</span><span class="token">/</span>literal<span class="token2">}</span>
<span class="token2">{</span>load href<span class="token">=</span><span class="token4">"/static/js/common.js,/static/js/common.css"</span> <span class="token">/</span><span class="token2">}</span> 加载js<span class="token2">,</span>css
<span class="token2">{</span>php<span class="token2">}</span>echo <span class="token4">'Hello,world!'</span><span class="token2">;</span><span class="token2">{</span><span class="token">/</span>php<span class="token2">}</span>
<span class="token2">{</span><span class="token6">/* 注释内容 */</span> <span class="token2">}</span> 或 <span class="token2">{</span><span class="token6">// 注释内容 }</span>
<span class="token2">{</span>include file<span class="token">=</span><span class="token4">"public/header"</span> <span class="token">/</span><span class="token2">}</span> 模板包含
<span class="token2">{</span>include file<span class="token">=</span><span class="token4">"Public/header"</span> title<span class="token">=</span><span class="token4">"$title"</span> keywords<span class="token">=</span><span class="token4">"开源WEB开发框架"</span> <span class="token">/</span><span class="token2">}</span> 传入参数
<span class="token2">{</span>foreach $list as $key<span class="token">=</span><span class="token">></span>$vo <span class="token2">}</span>
<span class="token2">{</span>$vo<span class="token2">.</span>id<span class="token2">}</span><span class="token2">:</span><span class="token2">{</span>$vo<span class="token2">.</span>name<span class="token2">}</span>
<span class="token2">{</span><span class="token">/</span>foreach<span class="token2">}</span>
<span class="token2">{</span><span class="token5">for</span> start<span class="token">=</span><span class="token4">"开始值"</span> end<span class="token">=</span><span class="token4">"结束值"</span> comparison<span class="token">=</span><span class="token4">""</span> step<span class="token">=</span><span class="token4">"步进值"</span> name<span class="token">=</span><span class="token4">"循环变量名"</span> <span class="token2">}</span>
<span class="token2">{</span><span class="token">/</span><span class="token5">for</span><span class="token2">}</span>
<span class="token2">{</span><span class="token5">if</span> 表达式<span class="token2">}</span>value1
<span class="token2">{</span>elseif 表达式 <span class="token">/</span><span class="token2">}</span>value2
<span class="token2">{</span><span class="token5">else</span> <span class="token">/</span><span class="token2">}</span>value3
<span class="token2">{</span><span class="token">/</span><span class="token5">if</span><span class="token2">}</span>
```
```
记录日志
```
<pre class="calibre14">```
log<span class="token2">.</span>php 可添加 <span class="token4">'json'</span> <span class="token">=</span><span class="token">></span> <span class="token3">1</span> 表示json格式
<span class="token1">trace</span><span class="token2">(</span><span class="token4">"日志信息"</span><span class="token2">)</span>
app<span class="token2">.</span>php中
<span class="token4">'app_trace'</span> <span class="token">=</span><span class="token">></span> <span class="token3">true</span><span class="token2">,</span>
trace<span class="token2">.</span>php改为默认html
<span class="token4">'type'</span> <span class="token">=</span><span class="token">></span> <span class="token4">'Console'</span><span class="token2">,</span>
```
```
上传
```
<pre class="calibre16">```
$file <span class="token">=</span> <span class="token1">request</span><span class="token2">(</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">file</span><span class="token2">(</span><span class="token4">'image'</span><span class="token2">)</span><span class="token2">;</span>
移动到框架应用根目录<span class="token">/</span>uploads<span class="token">/</span> 目录下
$info <span class="token">=</span> $file<span class="token">-</span><span class="token">></span><span class="token1">move</span><span class="token2">(</span> <span class="token4">'../uploads'</span><span class="token2">)</span><span class="token2">;</span>
<span class="token5">if</span><span class="token2">(</span>$info<span class="token2">)</span><span class="token2">{</span>
成功上传后 获取上传信息
输出 jpg
echo $info<span class="token">-</span><span class="token">></span><span class="token1">getExtension</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
输出 <span class="token3">20160820</span><span class="token">/</span><span class="token3">42</span>a79759f284b767dfcb2a0197904287<span class="token2">.</span>jpg
echo $info<span class="token">-</span><span class="token">></span><span class="token1">getSaveName</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
输出 <span class="token3">42</span>a79759f284b767dfcb2a0197904287<span class="token2">.</span>jpg
echo $info<span class="token">-</span><span class="token">></span><span class="token1">getFilename</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
<span class="token2">}</span><span class="token5">else</span><span class="token2">{</span>
上传失败获取错误信息
echo $file<span class="token">-</span><span class="token">></span><span class="token1">getError</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
<span class="token2">}</span>
多文件xphr
<span class="token1">foreach</span><span class="token2">(</span>$files as $file<span class="token2">)</span><span class="token2">{</span><span class="token2">}</span>
验证<span class="token2">,</span>生成带md5文件名
$info <span class="token">=</span> $file<span class="token">-</span><span class="token">></span><span class="token1">rule</span><span class="token2">(</span><span class="token4">'md5'</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">validate</span><span class="token2">(</span><span class="token2">[</span><span class="token4">'size'</span><span class="token">=</span><span class="token">></span><span class="token3">15678</span><span class="token2">,</span><span class="token4">'ext'</span><span class="token">=</span><span class="token">></span><span class="token4">'jpg,png,gif'</span><span class="token2">]</span><span class="token2">)</span><span class="token">-</span><span class="token">></span><span class="token1">move</span><span class="token2">(</span> <span class="token4">'../uploads'</span><span class="token2">)</span><span class="token2">;</span>
```
```
- 简介
- 第一章 数据库
- Mysql/mariadb
- 函数
- 基础
- 增删改索引
- 标准查询
- 高级查询
- TIDB集群mysql解决方案
- Redis
- 语言基础
- 5种数据类型
- 其他类型
- Sqlite
- 语言基础
- 常用查询
- 第二章 PHP
- 语言基础
- 第一课 流程控制和运算
- 第二课 数组
- 第三课 日期时间
- 第四课 常用函数
- 第五课 字符串
- 第六课 文件操作
- 第七课 面向对象
- 第八课 正则表达式
- 第九课 图片处理生成
- 第十课 curl/memche
- 第十一课 mysql和pdo
- 第十三课 cookie和session
- 第十四课 xml操作
- 第十五课 php5.3+新特性
- 第十六课 php7+
- 第十七课 密码安全
- 废弃函数
- php命令行
- redis应用
- 算法
- 排序算法
- 基础算法
- 无限级分类
- 自定义函数Fn
- 查找算法
- 自定义函数数据函数fn
- laravel
- 路由
- 常用语句
- 数据库
- dingo/api
- Yii2
- 控制器
- 常用类
- 数据库
- redis
- thinkphp6
- TP6文档
- TP6插件
- dedecms
- 织梦标签大全
- 数据库操作
- 内置函数和定义函数
- 织梦核心改动
- 织梦插件/底层标签开发
- PHP相关工具
- composer
- php开发环境phpenv
- Phpstorm使用
- windows编译php扩展
- PHP开源库
- 开源项目管理禅道
- sns_auth
- php-casbin权限控制
- php-jwt
- 微信SDKeasywechat
- querylist采集库
- workerman
- Box/Spout处理excel和csv
- dll扩展
- redis/memche/xdebug
- redis
- Lua
- php_xlswriter
- event
- swoole
- 常用代码库
- 微擎框架
- 第一课全局变量
- 第二课常用函数
- 第三课自定义微擎独有函数
- 第四课数据库操作
- 第五课微信端回复
- 第六课微擎高级操作
- 第八课global函数列表
- mainfest.xml详解
- js方法
- 人人商城
- 第一课model解读
- 第二课常用语句解读
- 第三课常用js解读
- 第四课附录常见问题
- 第五课附录处理报表|支付
- 常用JSON状态码
- 第三章 JavaScript
- js基础
- 浏览器对象
- 语言基础
- html5接口
- ES6新语法
- vue
- 基础语法
- 京东vueUI组件
- uniapp
- 组件开发规范
- nodejs
- 基础知识
- 安装node
- nvm不同版本node切换
- js常用标准库
- zepto/jquery
- weui
- js图标库
- elementUI
- validator表单验证
- layer弹出层
- requirejs
- wow动画
- 动画animate
- swiper4
- 百度编辑器
- flyio/axios/qs
- jquery.form
- bootstrap3
- clipboard复制
- slideout侧滑
- imagehover.css图片悬停动画
- webpack打包
- Bulma UI框架
- store 客户端存储
- lottie动画创建库
- sweetalert
- js自定义函数
- 常见JSSDK
- 微信公众号JSSDK
- 腾讯地图jssdk
- 微信小程序
- 第四章 编程语言
- markdown语言
- Dart语言
- Dart语言基础
- Flutter框架
- Lua语言
- 字符串,数组,表
- 自定义方法
- go语言
- 第1.1语言基本语法
- 第1.2流程控制
- 第1.3函数
- 第1.4结构体
- 第1.5接口
- 第1.6包
- go语言框架Gin
- CSS3语言
- CSS与CSS3
- 选择符
- 属性
- css3
- loading动画
- HTML5语言
- less
- sass
- C#
- 基础知识
- 函数
- 第五章 开发工具
- git
- nginx/apache服务器
- Linux常用操作
- crontab定时任务
- 注册表与cmd
- 阿里云ECS
- frp穿透和ssl续期
- 宝塔安装
- 树莓派
- 浏览器模拟
- 火狐/chrome常用插件
- WSL安装使用
- mac brew和终端命令
- win10相关