首页 > 解决方案 > 为什么我不能在 PHP 中链接图像、CSS 和 favicon

问题描述

我的 PHP 文件无法在 HTML 部分链接 CSS 或图像或网站图标 我在 HTML 而非 PHP 中多次使用此代码并且它完全有效 我不知道我的代码中有什么问题我

<link rel="icon" type="image/ico" href="GoFixWare logo.ico"> <link rel="stylesheet" href="css/bootstrap">
<img class="d-block mx-auto mb-4" src="GoFixWare-logos_transparent.png" alt="" width="100" height="100">
<img src="img_bg-min.jpg" class="d-block mx-lg-auto img-fluid" alt="Bootstrap Themes" width="700" height="500"
            loading="lazy">

我正在使用 xampp

<link rel="stylesheet" href="css/bootstrap">
<link rel="icon" type="image/ico" href="GoFixWare logo.ico">

标签: phphtmlcss

解决方案


<link rel="icon" type="image/ico" href="GoFixWarelogo.ico">

重命名你的图标,这里有更多href语法:文件名中有空格可以吗


推荐阅读