template_dir配置了之后的css路径问题

#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

#2 shekinah

查看后发现css指向localhost/proj/tpl/css/style.css,  ---有歧义,应该为 “查看后发现css应该指向localhost/proj/tpl/css/style.css,”

2014-06-28 00:48:25

#3 jake

请看手册,谢谢。http://www.speedphp.com/thread-3748-1-1.html

另外,请指出手册上的错误,谢谢。

2014-06-28 18:37:07