标签名称不限,标签位置不限,支持单双引号 (JS中不能使用标标签)
* [ ] 引入其他模板
```
<div php-file="tpl.php"></div>
```
* [ ] show
```
<a href="/article/lists?p={$p-1}" php-show='$p<2'>下一页</a>
<?php if($this->obtain('p')<2){?>
<a href="/article/lists?p=<?php echo $this->obtain('p')-1;?>">下一页</a>
<?php }?>
```
* [ ] selected
```
<select class="form-control">
<option php-for="$i = 1; $i <= 50; $i++" php-selected="$p == $i" value="{$i}">第{$i}页</option>
</select>
<?php for($this->TplData['i'] = 1; $this->TplData['i'] <= 50; $this->TplData['i']++){?>
<option<?php if($this->obtain('p') == $this->obtain('i')){?> selected="selected" <?php }?> value="<?php $this->obtain('i');?>">第<?php $this->obtain('i');?>页</option>
<?php }?>
```
* [ ] checked
```
<input type="radio" name="sex" value="0" php-checked="$user_sex === 0" />
<input type="radio" name="sex" value="0"<?php if($this->obtain('user_sex') === 0){?> checked="checked" <?php }?> />
```
* [ ] if
```
<span php-if="$sex == 1">男</span>
<span php-elseif="$sex == 0">女</span>
<span php-else="">其他</span>
<?php if($this->obtain('sex') == 1){?>
<span>男</span>
<?php }elseif($this->obtain('sex') == 0){?>
<span>女</span>
<?php }else{?>
<span>其他</span>
<?php }?>
<div php-show='$is_downloa="aaaaaa" && $zxczxc==8' class="aaa">
<a php-show="$p<2" href="/article/lists?p={$p-1}">下一页</a>
<input type="button" onclick="down()" />
<a php-show="$p>1" href="/article/lists?p={$p-2}">上一页</a>
</div>
<?php if($this->obtain('is_downloa')="aaaaaa" && $this->obtain('zxczxc')==8){?>
<div class="aaa">
<?php if($this->obtain('p')<2){?>
<a href="/article/lists?p=<?php echo $this->obtain('p')-1;?>">下一页</a>
<?php }?>
<input type="button" onclick="down()" />
<?php if($this->obtain('p')>1){?>
<a href="/article/lists?p=<?php echo $this->obtain('p')-2;?>">上一页</a>
<?php }?>
```
* [ ] foreach
```
<table>
<tr php-foreach="$list as $article">
<td>{$article.id}</td>
<td>{$article.title}</td>
<td>{$article.author}</td>
<td>
<a href="/article/detail?id={$article.id}">查看</a>
<a href="/article/del?id={$article.id}">删除</a>
</td>
</tr>
</table>
<table>
<?php foreach($this->obtain('list') as $this->TplData['article']){?>
<tr>
<td><?php echo $this->obtain('article.id');?></td>
<td><?php echo $this->obtain('article.title');?></td>
<td><?php echo $this->obtain('article.author');?></td>
<td>
<a href="/article/detail?id=<?php echo $this->obtain('article.id');?>">查看</a>
<a href="/article/del?id=<?php echo $this->obtain('article.id');?>">删除</a>
</td>
</tr>
<?php }?>
</table>
```
* [ ] for
```
<a php-for="$i = $page_start; $i <= $page_end; $i++" href="/article/lists?p={$i}">第{$i}页</a>
<?php for($this->TplData['i'] = $this->TplData['page_start']; $this->TplData['i'] <= $this->TplData['page_end']; $this->TplData['i']++){?>
<a href="/article/lists?p=<?php echo $this->obtain('i');?>">第<?php echo $this->obtain('i');?>页</a>
<?php }?>
```
* [ ] switch
```
<div php-switch="$status">
<span php-case="1">
正常
</span>
<span php-case="2">
待审核
</span>
<span php-case="stop">
已禁用
</span>
<span php-case="$del">
已删除
</span>
<span php-default="">
未知状态
</span>
</div>
<?php switch ($this->obtain('status')){?>
<div>
<?php case 1:?>
<span> 正常 </span>
<?php break;?>
<?php case 2:?>
<span> 待审核 </span>
<?php break;?>
<?php case "stop":?>
<span> 已禁用 </span>
<?php break;?>
<?php case $this->obtain('del'):?>
<span> 已删除 </span>
<?php break;?>
<?php default:?>
<span> 未知状态 </span>
<?php break;?>
</div>
<?php }?>
```
- 开始使用
- 配置文件
- 路由模式
- AutoLoad类
- 启动文件
- __construct
- SetRouting
- SetAlias
- SetStop
- SetError
- Access
- SetWorker
- SetClassFile
- SetClassDir
- Run
- OpenLoad
- LinuxStartAll
- Session类
- 使用说明
- set
- get
- delete
- pull
- has
- id
- Cookie类
- 使用说明
- set
- get
- delete
- pull
- has
- TempLets类
- 模板语法
- 模板标签
- html
- show
- assign
- obtain
- Request类
- get
- post
- host
- referer
- getip
- localip
- header
- body
- file
- scheme
- protocolversion
- uri
- path
- querystring
- method
- Response
- SendFile
- FileStream
- SendData
- SetStatus
- SetHead
- SetMime
- WebSend
- redirect
- dumpJson
- dump
- come
- ps
- Frame类
- GetWeb
- ViewFile
- RoutingData
- SetClassFile
- SetClassDir
- GetMime
- FileMime
- LoadDir
- StartDir
- IsJson
- ArrJson
- JsonFormat
- ObStart
- GetConfig
- ConfigDir
- TempDir
- GetRunData
- GetStatic
- IsDebug
- SetDebug
- GetDebugInfo
- GlobalVariables类
- 使用说明
- set
- get
- delete
- pull
- has
- id
- Mysql类
- 新版本
- 第三方
- Thinkorm
- Medoo
- 旧版本
- Mysql 配置格式
- 项目中操作数据库
- 项目场景
- 项目数据库配置
- 项目数据库中间类
- 项目中操作数据表
- 连贯操作
- where
- table
- data
- order
- field
- limit
- page
- group
- having
- join
- tabname
- union
- sql
- link
- link_base
- lock
- CURD 操作
- 写入数据
- 数据删除
- 数据查询
- 数据更新
- 数据统计操作
- count
- sum
- max
- min
- avg
- 操作DEMO
- CurdTrait.php
- 项目Model层操作表.md
- Curl类
- Method类
- SslAes类
- layui_zqadmin