限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。

微擎

微擎模版引擎

include $this->template('index'); 写在前台方法里寻找的目录:/Addons/xxx/template/mobile/index.html 写在后台方法里寻找的目录:/Addons/xxx/template/index.html 变量的赋值 定义: $name="王明昌博客"; 输出变量: {$name} 循环 定义: $ar

作者
王明昌
发布时间
最后更新
include $this->template('index'); 写在前台方法里寻找的目录:/Addons/xxx/template/mobile/index.html 写在后台方法里寻找的目录:/Addons/xxx/template/index.html

变量的赋值

定义: $name="王明昌博客"; 输出变量: {$name}

循环

定义: $arr = [1,2,3,'f']; 使用: {loop $arr $index $v} {$v} {/loop}

判断

{if}{else}{/if}

php代码

{php $a=$a+1}

创建url

调用模版

{template 'header'}
0/500
友善分享您的看法。
反馈邮箱