我在Zend中创建了新项目并创建了布局。但是,我在安装CSS目录时遇到了问题。如果我在控制范围内有一个动作。目录不断更改
例如:
对于这个网址:localhost:88zendproject/public/it是ok
但为了这个http://localhost:88/zendproject/public/account/css的目录变为http://localhost:88/zendproject/public/account/css/bootstrap.css其中添加account并将路径更改为css。。
你能告诉我如何在zend中正确配置布局吗?这样我就可以用于多个模块(模块内模块)
在视图/布局中,指定静态资产(图像、CSS、JS等)的路径时,请使用BaseUrl
帮助程序。例如
<?php echo $this->headLink()
->appendStylesheet($this->baseUrl('css/bootstrap.css')) ?>
http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.baseurl