问题
http://localhost:8080/asset/js/boostrap.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
In my folder asset/js/
I´ve the file boostrap.min.js
What´s the problem?
回答1:
There are many reasons you get a file not found exception. The most popular is the file permissions. If you are on UNIX try
chmod -R 777
in the folder that contains bootstrap.min.js. If this doesn't works you have to review the server conf files or the .htaccess files.
If you want a "just works solution" include the bootstrap from a cdn.
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"></script>
If none of the above works for you please post your .htaccess contents from the directory which bootstrap is located.
回答2:
Use
<script src="{{URL::asset('asset/js/bootstrap.min.js')}}"></script>
instead
回答3:
try {{ HTML::script('asset/js/boostrap.min.js') }}
and put the boostrap.min.js into the public/asset/js folder
回答4:
I was having a problem with simply referencing app.css and this worked:
link rel="stylesheet" href="{{('css/app.css')}}"
I'm not exactly sure why the {{}} around css/app.css works. I didn't have the braces before and got error 404. Can someone explain why the braces resolve the not found 404 error?
来源:https://stackoverflow.com/questions/29614890/failed-to-load-resource-the-server-responded-with-a-status-of-404-not-found