Think PHP 学习笔记 12.视图的使用
发布日期:2021-05-14 20:24:54 浏览次数:20 分类:精选文章

本文共 1547 字,大约阅读时间需要 5 分钟。

���������������������

1. ���������������������������

���������������������������`'TMPL_TEMPLATE_SUFFIX' => '.tpl'`���������������������������������������������

2. ���������������������������������

���������������`'TMPL_FILE_DEPR' => '_'`������TPL������������������������������Index_index.html������������������������������

3. ������������������������

������������������`'DEFAULT_THEME' => 'your'`���������������������`'TMPL_DETECT_THEME' => true`������`THEME_LIST`������������������������������`'your'`���`'my'`������������������������������������������

���������������������������

display������������������������������������������������������$this->display();������������������������������������$container->display('public:error')������������������ UTF-8 ������������������������������fetch���������

$content = $container->fetch('Public:error');

���������������������������������������������������������������h1���i���������������������������������show���������������

$content = str_replace('h1','i',$content);

$container->show($content);

������������assign���������������������������������$container->assign('name', '���'); ������������������������$container->name���������������������������������

������������������

���������������������������������������������������`__PUBLIC__`������������������������������������`__ROOT__`������������������������`__APP__`������������URL������������������`'TMPL_PARSE_STRING' => array('__CSS__' => '__ROOT__.'/Public/Css', '__JS__' => '__ROOT__.'/Public/Js')`,������������������������������������������������

上一篇:Think PHP 学习笔记 15.模板变量的详解
下一篇:Think PHP 学习笔记 11.常用的连贯操作

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2025年05月01日 04时08分52秒