在这个问题投入了相当长的一段时间后,我仍然无法让这个工作。在我的base.html.twig文件中,我链接到位于web目录内的css / style.css的mystyle.css文件,如下所示:
{% block stylesheets %}
<link href="{{ asset('css/style.css') }}" rel="stylesheet">
{% endblock %}
然后我在我的模板文件中扩展base.html.twig文件,当我导航到这些文件中的任何一个时,我在浏览器控制台中收到以下错误消息:
GET http://testsymf/css/style.css net::ERR_ABORTED
我的服务器配置:
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\test3\web\app_dev.php"
ServerName testsymf
<Directory /xampp/htdocs/test3/web>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
权限问题,请检查您的权限级别。