我想在laravel项目中集成一个模板。
错误消息:
<spring.version>5.0.10.RELEASE</spring.version>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
我想通过这种方式访问文件:
GET http://localhost/safeAgency.com/public/files/bower_components/bootstrap/js/bootstrap.min.js net::ERR_ABORTED 404 (Not Found)
我的项目的 <link rel="stylesheet" type="text/css" href="{{asset('local_agent/../files/bower_components/bootstrap/css/bootstrap.min.css')}}">
目录中有一个名为local_agent
的文件夹。在此local_agent目录文件夹中,我有两个名为public
和files
的文件夹。 dashboard
文件存在于仪表板文件夹下。但是在HTML
文件夹files
文件夹中,然后是bower_components
然后是等等。这里需要提及另一件事:bootstrap
文件位于名为"bootstrap.min.css"
的文件夹中,这意味着从当前文件夹向上一级。这就是为什么我在文件前使用files
。希望你能理解。
答案 0 :(得分:1)
您可以像下面这样访问该文件:
<link rel="stylesheet" type="text/css" href="{{asset('local_agent/files/bower_components/bootstrap/css/bootstrap.min.css')}}">