Warning: Illegal string offset 'top' in /www/wwwroot/hellyhua.com/wp-content/themes/Snape/single.php on line 45

在模版中使用的语法规则:
例如:templates/default/content/show.html

1、变量表示
{$title} 被解析成 <?php echo $title;?>
最终值:我是标题
2、常量表示
{R}被解析成 <?php echo R;?>
最终值:http://我的域名/res/
3、条件判断
{if 条件} 要显示的内容1 {else} 要显示的内容2 {else} 要显示的内容3{/if} 
或者 {if 条件} 要显示的内容 {/if}
例如:{if $title!=**}{$title}{/if}
4、循环
{loop $a $b} * {/loop} 或者 {loop $a $b $c} * {/loop} ,{loop $a $b} * {/loop}
被解析成 *
而{loop $a $b $c} * {/loop}则被解析成 $c) { ?> *

5.模板包含
{T *模块目录名*,*文件名*}
例如: 
{T “content”,”head”,TPLID}
6.自增、自减
例如:
{php $i=10;}{loop $a $b}{$i++}{/loop}
参数:自减 {$i–} {–$i} 自增 {$i++} {++$i}
7.单行PHP解析:
例如:{php $i=1;} 解析为:
例如:{php $string = date(*Y-m-d*);} 解析为:


Warning: Illegal string offset 'footer' in /www/wwwroot/hellyhua.com/wp-content/themes/Snape/single.php on line 49