Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 与Symfony2资产包和'冲突;不存在的路线';_Php_Symfony - Fatal编程技术网

Php 与Symfony2资产包和'冲突;不存在的路线';

Php 与Symfony2资产包和'冲突;不存在的路线';,php,symfony,Php,Symfony,Assetic无法很好地使用此标签: {% stylesheets output='/style/app.css' '@VendorBundle/Resources/style/main.css' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} {%stylesheets输出='/style/app.css' “@VendorBundle/Resources/style/

Assetic无法很好地使用此标签:

{% stylesheets output='/style/app.css'
    '@VendorBundle/Resources/style/main.css'
%}
    <link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{%stylesheets输出='/style/app.css'
“@VendorBundle/Resources/style/main.css”
%}
{%endstylesheets%}
如果我用它,就好像阿塞特不知道该怎么办。在config_dev
中,使用控制器
为true。我找不到我做错了什么。我只知道:

在呈现模板期间引发了异常(“无法为命名路由生成URL”\u assetic\u aca6c7a\u 0,因为该路由不存在。”)在“VendorBundle:Section:template.html.twig”中


可能是缓存问题?我不知道我可以尝试什么…

只需在config.yml文件中添加捆绑包的名称,这样它就可以拥有创建文件的权限

assetic:
    bundles:        [ VendorBundle ]

我也有同样的问题。在我的例子中,清除app/cacheapp/logs解决了这个问题。

我有一个类似的问题,通过在routing\u dev.php中添加一个路由来解决

_assetic:
    resource: .
    type:     assetic

为我工作得很好!