【发布时间】:2011-10-02 04:32:33
【问题描述】:
我已经为 smarty 模板创建了一个文件夹结构
F .f1 ..template1.tpl ..test.tpl 模板1.tpltemplate_dir 路径指向文件夹 'f/'
在test.tpl中是下面的代码
{include file="template1.tpl"}
{include file="../template1.tpl"}
此代码不起作用。知道我哪里可能出错了吗?
我阅读了有关 $smarty-> use_sub_dirs = true 的信息,它确实在我的 template_c 文件夹中创建了子文件夹,但我仍然无法按照上述代码包含模板。
提前致谢。
【问题讨论】:
-
我自己解决了这个问题。这个想法是做一个 {include file="f1/template1.tpl"} {include file="template1.tpl"}
标签: smarty