zend-framework – 如何在视图文件中包含css

前端之家收集整理的这篇文章主要介绍了zend-framework – 如何在视图文件中包含css前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已将css包含在视图文件中,如下所示
<link rel="stylesheet" type="text/css" href="<?PHP echo $this->baseUrl('style/root.css'); ?>" />
<link rel="stylesheet" type="text/css" href="<?PHP echo $this->baseUrl('style/reset.css'); ?>" />

但它给出了这个错误 – >

<b>Message:</b> Invalid controller specified (style)  </p>

在application.ini中,我使用过这个

resources.frontController.baseUrl = "/zendtest/public"
resources.view[] = "";

我该如何解决这个问题?

在任何视图文件(.phtml扩展名)中使用类似这样的javascript或css:
$this->headScript()->prependFile('/scripts/jquery.min.js');
$this->headScript()->appendFile('/scripts/fg.menu.js');

$this->headLink()->appendStylesheet('/css/form.css');
$this->headLink()->prependStylesheet('/css/jquery_ui_theme/jquery-ui.custom.css');
原文链接:https://www.f2er.com/php/135577.html

猜你在找的PHP相关文章