CSS stylesheets path not being detected by the server 404 not found error?

前端 未结 3 1605
迷失自我
迷失自我 2021-01-22 17:18

I have a Header File by the name header.php which goes like this :

It is inside a folder called includes so the path is includes/header.php



        
相关标签:
3条回答
  • 2021-01-22 17:43

    Maybe it's better to test with header.php absolute path first. Also path of your scripts and style sheets should be relative to index.php not header. (Sorry for bad English)

    0 讨论(0)
  • 2021-01-22 17:54

    You're including ../include/header.php and style.css is there too, namely ../include/style.css. So, you must either use the same relative path or an absolute path to your css /include/style.css.

    0 讨论(0)
  • 2021-01-22 17:57

    The link to your CSS file should be relative to the URL of the page you are viewing.

    For example, if you view your page at example.com, you must reference the CSS file with example.com/includes/style.css.

    0 讨论(0)
提交回复
热议问题