我正在尝试让我的laravel应用程序在godaddy上运行,我将公共文件夹的内容移到了root public目录下
_
html文件夹,应用程序已启动并运行,下面是
链接
、css文件和图像未加载。为什么呢?
我的css文件的链接是给出写路径时,我使用
在浏览器上。但并不是真的有效。
下面是链接到css文件的代码:
我也尝试过:
和:
没有一个适合我在主机上工作,但在本地主机上工作得很好
我的图片链接图片的代码:
{{ URL::asset('images/logo.png')}}
发布于 2018-06-10 04:07:09
在主机上输入public的完整路径的问题
_
主机上的html文件夹
发布于 2018-04-28 15:49:58
我认为这不是托管问题,您的style.css不存在于css文件夹和图片文件夹中。上传这些文件。如果你在控制台中看到,你会发现404 not found错误。
style.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
logo.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
slide1.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
slide2.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
financial.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
slide3.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
style.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
发布于 2021-03-02 13:48:28
如果文件存在但显示404错误,这是另一种处理丢失的js和css文件的方法。
Laravel链接href无效路径
https://stackoverflow.com/questions/50074068
复制相似问题