favicon 存在问题,只要路径与将其保存在与 html 相同的文件夹中不同,就无法显示该图标
>所以这不起作用
但这可以将 favicon 放在与html一.
我如何才能让它显示出来并将其保存在照片文件夹中?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
>所以这不起作用
但这可以将 favicon 放在与html一.
我如何才能让它显示出来并将其保存在照片文件夹中?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
这是一个路径问题。你可以尝试以下两件事之一。
如果已经在实时服务器上,您可以将其定向到文件所在的位置,如下所示 href="https://www.example.com/photos/icon.ico" (如果您的照片文件夹,请记住正确的路径不在 public_html 中)
如果资源位于本地服务器上,您可以尝试使用“./”(与当前页面相同的文件夹)或“../”(当前页面的上一个文件夹)。
its a path problem. you can try one of two things.
if on a live server already, you can direct it to where the file is located as this href="https://www.example.com/photos/icon.ico" (remember to path correctly if your photos folder isnt located in public_html)
if the resource is located on a local server you can try using "./" (same folder as current page) or "../"(previous folder from current page).
删除第一个“/”可能会解决此问题。如果没有,那是因为图像文件夹位置的原因。 images 文件夹位置应与 html 文件夹位于同一文件夹内。 HTML_folder/photos/icon.ico 从技术上讲是这样的,但它应该看起来像 photos/icon.ico 。
Removing the first "/" may solve this problem. If it doesn't that is because of the images folder location. The images folder location should be inside the same folder as the html folder. HTML_folder/photos/icon.ico is what it technically is saying, but it should look like photos/icon.ico .
