首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >laravel 5.3托管问题-未加载css

laravel 5.3托管问题-未加载css
EN

Stack Overflow用户
提问于 2018-04-28 15:33:37
回答 3查看 1.5K关注 0票数 1

我正在尝试让我的laravel应用程序在godaddy上运行,我将公共文件夹的内容移到了root public目录下

_

html文件夹,应用程序已启动并运行,下面是

链接

、css文件和图像未加载。为什么呢?

我的css文件的链接是给出写路径时,我使用

在浏览器上。但并不是真的有效。

下面是链接到css文件的代码:

我也尝试过:

和:

没有一个适合我在主机上工作,但在本地主机上工作得很好

我的图片链接图片的代码:

代码语言:javascript
复制
{{ URL::asset('images/logo.png')}}
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2018-06-10 04:07:09

在主机上输入public的完整路径的问题

_

主机上的html文件夹

票数 0
EN

Stack Overflow用户

发布于 2018-04-28 15:49:58

我认为这不是托管问题,您的style.css不存在于css文件夹和图片文件夹中。上传这些文件。如果你在控制台中看到,你会发现404 not found错误。

代码语言:javascript
复制
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)
票数 1
EN

Stack Overflow用户

发布于 2021-03-02 13:48:28

如果文件存在但显示404错误,这是另一种处理丢失的js和css文件的方法。

Laravel链接href无效路径

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50074068

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档