1. 基本设置

1. 网页是否允许非Post访问,写在模板的最前面
    {assign this.allow = true }

2. 网页包含内容,file是需要包含的文件
    {include file="head.htm"} 

3. 网页数据行取值

    {@config.webname}  

     =>  

     config["webname"].toString();


4. #将字符用int类型输出

    {#dr.id}


5. 网站生成静态文件时的保存文件名称

    {assign this.savefile = "type.html"}


6. 动态页面不需要读取数据库配置,直接读取模板重新生成动态页面
    {assign this.template= "type.html"}


7. 设置当前页面的参数

    {assign set_query("CategoryID","=","0")}


8. 调用后台方法(| 前为方法名称,后为方法参数)
    {$date_format | dr.val("addtime"),100}
      =>

      date_format(dr.val("addtime") , 100)


9. IF判断({}是代码执行语句,必须是代码编程语句)
    {if(dr.val("imageurl")!="")} src="{@dr.imageurl}" {else} src="default.jpg" {/if}


玩咖指针 2020-03-04 15:09:30