assign("t">
thinkPHP控制器变量在模板中的显示方法示例
ThinkPHP  /  管理员 发布于 7年前   500
本文实例讲述了thinkPHP控制器变量在模板中的显示方法。分享给大家供大家参考,具体如下: 控制器中变量 模板中引用位置一:php代码中,直接用 模板中引用位置二:模板中直接应用 模板中引用位置三:模板标签中用,如condition中用,不加{}。 更多关于thinkPHP相关内容感兴趣的读者可查看本站专题:《ThinkPHP入门教程》、《thinkPHP模板操作技巧总结》、《ThinkPHP常用方法总结》、《codeigniter入门教程》、《CI(CodeIgniter)框架进阶教程》、《Zend FrameWork框架入门教程》及《PHP模板技术总结》。 希望本文所述对大家基于ThinkPHP框架的PHP程序设计有所帮助。 122 在 123 在 原梓番博客 在 博主 在 1111 在
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号
public function register() { $type = I("param.type");//1.学生注册 2.教师注册 3.其他注册 $this -> assign("type", $type); //q全部部门 $depart1 = M("Depart") -> where("status=1 and fid=0") -> order("id asc") -> select(); $this -> assign("depart1", $depart1); $this -> display();}
$i;
{$i}
或者 class="{$unlogined}"
注意:1.非相关人员,严禁注册。{$i}
您可能感兴趣的文章: