Zendframework CSS 问题 [英] Zendframework CSS Problem
问题描述
我对 zend 框架工作非常陌生,我正在尝试在本地服务器上设置一个项目(由其他程序员完成),我已经设置了这个项目,但是我的浏览器中的所有页面都是样式,即phtml 页面中没有采用 CSS 文件,为了解决这个问题,我需要编辑哪个文件?
请帮帮我
我将在引导文件中添加的全局 css 文件以及与我将添加到相关控制器操作中的页面相关的任何样式,例如...>
引导文件中的全局样式
受保护的函数 _initView(){$this->view = new Zend_View();$this->view->headLink()->appendStylesheet('css/global.css');}
或在特定的控制器操作中
公共函数 myPageAction(){$view = $this->view;$view->headLink()->appendStylesheet('css/myPageStyles.css');}
I am very to new to zend frame work , I am trying to set up a project (Done by other programmer) in my local server, i have setted up this project, but all pages are styless in my browser, ie the CSS files are not taken in phtml pages, For solving this issue which file I have ti Edit?
Plss Help me
Global css files I would add in the bootstrap file and any styles that relate to a page I would add in the relevant controller action for example...
global styles in bootstrap file
protected function _initView()
{
$this->view = new Zend_View();
$this->view->headLink()->appendStylesheet('css/global.css');
}
or in a specific controller action
public function myPageAction()
{
$view = $this->view;
$view->headLink()->appendStylesheet('css/myPageStyles.css');
}
这篇关于Zendframework CSS 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!