symfony 输出css异常

来源:7-3 如何把资源文件交给Symfony2

不开挂的啊三

2016-02-21 22:20

<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>
            {% block title %}
            {% endblock%}
        </title>
        {% block global_css %}
            {% stylesheets
                    '@ShopWebBundle/Resources/public/css/*'
            %}
            <link rel="stylesheet" href="{{ asset_url }}" />
            {% endstylesheets %}
        {% endblock %}
        {% block my_css %}
        {% endblock %}
        {% block global_js %}
        {% endblock %}
        {% block my_js %}
        {% endblock %}
    </head>
为什么我会报下面异常,求洪老师指教!
An exception has been thrown during the compilation of a template ("You must add ShopUserBundle to the assetic.bundle config to use the {% stylesheets %} tag in ShopUserBundle::loginlayout.html.twig.") in "D:\php_env\htdocs\sfshop\src\Shop\Bundle\UserBundle/Resources/views/loginlayout.html.twig".

写回答 关注

1回答

  • 不开挂的啊三
    2016-02-21 22:30:32

    问题解决了,看了洪老师回答其他同学的类似的提问,非常感谢!

洪大师带你解读Symfony 2框架

洪大师教你玩转强大的框架-Symfony2,提高代码性能

20604 学习 · 245 问题

查看课程

相似问题