IndexAction.class.php:
$name='xiaohuang';
$this->name=$name;
index.html:
<switch name="name">
<case value='laoshi'>小明,滚出去</case>
<case value='xiaohong|xiaohuang'>小明,你滚出去</case>
<default/>小明,自己滚出去</case>
</switch>
$name='xiaohuang';
$this->name=$name;
index.html:
<switch name="name">
<case value='laoshi'>小明,滚出去</case>
<case value='xiaohong|xiaohuang'>小明,你滚出去</case>
<default/>小明,自己滚出去</case>
</switch>
2016-10-24
eq= neq!= gt> egt>= lt< elt<= heq=== nheq!==<br/>
<for start='1' end='10' comparison='elt' name='k'>
{$k}<br/>
</for>
<for start='1' end='10' comparison='elt' name='k'>
{$k}<br/>
</for>
2016-10-24
IndexAction.class.php:
$num=15;
$this->num=$num;
index.html:
<if condition="$num gt 10">num大于10
<elseif condition="$num lt 10"/> num小于10
<else/>num等于10
</if>
$num=15;
$this->num=$num;
index.html:
<if condition="$num gt 10">num大于10
<elseif condition="$num lt 10"/> num小于10
<else/>num等于10
</if>
2016-10-24
For You:
index.html:
<volist name='person' id='data' offset='1' length='2' empty='我没数据'>
{$data['name']}----{$data['age']}<br/>
</volist>
<p>
<foreach name='person' item='data'>
{$data['name']}----{$data['age']}<br/>
</foreach>
index.html:
<volist name='person' id='data' offset='1' length='2' empty='我没数据'>
{$data['name']}----{$data['age']}<br/>
</volist>
<p>
<foreach name='person' item='data'>
{$data['name']}----{$data['age']}<br/>
</foreach>
2016-10-24
For You:
IndexAction.class.php:
$person=array(
1=>array('name'=>'Jack','age'=>'18'),
2=>array('name'=>'Tom','age'=>'19'),
3=>array('name'=>'Peter','age'=>'20'),
4=>array('name'=>'Mary','age'=>'21'),
);
$this->person=$person;
$this->display();
IndexAction.class.php:
$person=array(
1=>array('name'=>'Jack','age'=>'18'),
2=>array('name'=>'Tom','age'=>'19'),
3=>array('name'=>'Peter','age'=>'20'),
4=>array('name'=>'Mary','age'=>'21'),
);
$this->person=$person;
$this->display();
2016-10-24
老师讲的时候可能没有办法涵盖所有。毕竟时间精力都有限。大概教你是怎么回事就行了 。不至于拿到手的时候完全是蒙的。免费的东西还特么挑三拣四。。你行你来?给讲个切合实际的。。真是事多。
2016-10-23
$this->assign('name',$name)->assign('sex','man')->assign('today',$date); 连续输入会报错non-object
2016-10-21
第一步,加载thinkPHP中的thinkPHP,第二步,加载thinkPHP的核心文件,第三步,加载项目文件 分析URL 调用相关控制器
2016-10-20