display的问题

#1 prince

$this -> display("");
里面那个html文件不在模板目录里的话应该怎么写?

2010-11-08 16:28:01

#2 jake

http://www.smarty.net/manual/en/api.display.php

2010-11-08 16:32:14

#3 prince

回复 2 jake


    但是spConfig.php里已经定义了
'view' => array( // 视图配置
                'enabled' => TRUE, // 开启视图
                'config' =>array(
                        'template_dir' => APP_PATH.'/tpl', // 模板目录
                        'compile_dir' => APP_PATH.'/tmp', // 编译目录
                        'cache_dir' => APP_PATH.'/tmp', // 缓存目录
                        'left_delimiter' => '{',  // smarty左限定符
                        'right_delimiter' => '}', // smarty右限定符
                ),
只是临时用到$this -> display("");来显示模板目录以外的模板文件.

2010-11-08 17:05:58

#4 jake

在display说明中:关于模板目录和放在非模板目录的方法,可以在Template Resource的文档中找到。
http://www.smarty.net/manual/en/template.resources.php
请注意看以上文档相关的权限限制和使用方法。

2010-11-08 17:16:20