Thinkphp模版display()使用方法

 
更多

一、 全自动

Class IndexAction extends Action{
Function index(){
$this -> display();
}
}

直接定位至该动作目录下的方法名如:应用/tpl/default/Index/index.html

二、

function index(){
$this -> display(‘ng’);
}

此项会加载/tpl/default/Index/ng.html

三、

function index(){
$this -> display(‘User:index’);
}

此项会加载/tpl/default/User/index.html

四、 加载其他皮肤下的文件

Function index(){
$this -> display(skin@user:index)
}

皮肤的目录名称@找哪个目录的名称:模板的名称
加载的路径:tpl/skin/user/index.html

五、 全路径输出:

Function index(){
$this -> display(‘./Public/skin/gg.html’);
}
打赏

本文固定链接: https://www.cxy163.net/archives/219 | 绝缘体-小明哥的技术博客

该日志由 绝缘体.. 于 2012年01月30日 发表在 html, PHP, ThinkPHP, 编程语言 分类下,
原创文章转载请注明: Thinkphp模版display()使用方法 | 绝缘体-小明哥的技术博客
关键字: , , , ,

报歉!评论已关闭.