0

我在这里找到了很多关于这个问题的答案,但它们似乎对我不起作用。我正在尝试在刀片模板中链接我的 CSS 和 JS,但它们不起作用。

我用了:

<link rel="stylesheet" href="{{ URL::asset('assets/css/bootstrap.min.css') }}">

产生:

<!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="http://mysiteurl.org/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://mysiteurl.org/css/bootstrap-reset.css">
    <!--external css-->
    <link rel="stylesheet" href="http://mysiteurl.org/assets/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="http://mysiteurl.org/css/owl.carousel.css">
    <!--Custom styles for this template-->
    <link rel="stylesheet" href="http://mysiteurl.org/css/style.css">
    <link rel="stylesheet" href="http://mysiteurl.org/css/style-responsive.css">
    <link rel="stylesheet" href="http://mysiteurl.org/css/custom.css">
    <!-- Bootstrap core CSS -->

似乎它应该进入公共文件夹,但 CSS 没有出现。我正在使用 nginx 并将根设置为公共。该站点和所有路线都可以正常工作,但css是问题所在。

我不确定这是 Nginx 的事情、HipHop 的事情还是代码的事情。

这是我的 NGinx 配置文件:

server {
    listen 80;

    root /var/www/mysiteurl.org/public;
    index index.php index.html index.htm ;

    server_name mysiteurl.org;

    access_log /var/log/nginx/mysiteurl.org-access.log;
    error_log  /var/log/nginx/mysiteurl.org-error.log error;

    charset utf-8;

    location / {
        try_files \$uri \$uri/ /index.php?\$query_string;
    }

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt  { log_not_found off; access_log off; }

    error_page 404 /index.php;      

    include hhvm.conf;  # The HHVM Magic Here

    # Deny .htaccess file access
    location ~ /\.ht {
        deny all;
    }
}
4

0 回答 0