1

我的路径有问题。

如果我把这个

{% set img = 'upload/img/'~cars.image~'' %}
<img src="{{img|imagine_filter('recherche') }}" alt="{{ cars.name}}{{ cars.model}}" />

我有一个 404 错误“app_dev.php/media/cache/resolve/recherche/upload/img/upload/img/79.jpeg”

所以我尝试删除'upload/img/'但我有这个错误:

An exception has been thrown during the rendering of a template ("Parameter "path" for route "liip_imagine_filter" must match ".+" ("" given) to generate a corresponding URL.") in VAPlatformBundle:Default:research.html.twig at line 50.

我有点困惑。

谢谢你的帮助!

4

1 回答 1

0

尝试更改此行

{% set img = '上传/img/'~cars.image~'' %}

经过

{% set img = '上传/img/'~cars.image %}

于 2016-05-02T23:34:34.213 回答