当我尝试创建路径变量时:
{% block jquery %}
<script>var url = "{{ path('bundles/foo/ajax/widb-get-data.php') }}";</script>
{% endblock %}
我收到以下错误:
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "FooBundle:Default:myfile.php" as such route does not exist.")