Symfony Bootrstrap不加载

时间:2015-12-10 14:26:11

标签: css symfony twitter-bootstrap-3

大家好我加载默认启动带文件有问题。这是加载css和js的基本代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

{% block title -%}<title>Admin</title>{% endblock %}
{% block stylesheets %}
    {% stylesheets
    '@CoreBundle/Resources/public/css/*' %}
    <link href="{{ asset(asset_url) }}" rel="stylesheet">
    {% endstylesheets %}
  {% endblock %}
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
 </head>
 <body>
{% block menu -%} {% endblock %}
{% block body -%} {% endblock %}
{% block javascripts -%}
{% javascripts
'@CoreBundle/Resources/public/js/jquery-1.11.3.min.js'
'@CoreBundle/Resources/public/js/bootstrap.min.js'
'@CoreBundle/Resources/public/js/fine-uploader.min.js'
'@CoreBundle/Resources/public/js/jquery-ui.min.js'
'@CoreBundle/Resources/public/js/datatables.min.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/dataTables.buttons.min.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.html5.js'
'@CoreBundle/Resources/public/js/Buttons-1.1.0/js/buttons.bootstrap.min.js'
'@CoreBundle/Resources/public/js/JSZip-2.5.0/jszip.min.js'
'@CoreBundle/Resources/public/js/RowReorder-1.1.0/js/dataTables.rowReorder.min.js'

%}
<script src="{{ asset(asset_url) }}" type="text/javascript"></script>
{% endjavascripts %}
{% endblock %}

资产后:instal和assetic:转储引导程序文件指向不正确的路径,请参阅图像

enter image description here

它获取文件并重命名,但它看起来是http://localhost:8000/css/Bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf

中的网址

我不知道为什么会出现这种行为。什么可能导致这个问题?

以下是@CoreBundle Resources

中的文件

enter image description here

1 个答案:

答案 0 :(得分:0)

这似乎是bootstrap文件的问题。所以转到bootsrap page并下载完整的.zip文件,然后将它们复制并粘贴到正确的目录中。