#1 shekinah
配置好'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右限定符
),
'auto_display' => TRUE, // 使用自动输出模板功能
'auto_display_sep' => "_", // 自动输出模板的拼装模式,/为按目录方式拼装,_为按下划线方式,这里用下划线
),
在tpl目录下存在
index.html
css/style.css
此时,如果在index.html中有
浏览器打开localhost/proj后发现,css没有起作用,查看后发现css指向localhost/proj/tpl/css/style.css,这个明显不符合需求嘛。。。
但是我发现jake的带acl的留言本例子中确实这么写的。。。俺新手,谁能告诉我为啥?最好解释下;P
2014-06-28 00:46:50