文件夹结构
我在主项目文件夹中有两个子文件夹。一个名为“includes”的文件夹,另一个名为“css”的文件夹。 我有以下文件: -
我的index.php通过这种方式包含header.html:
我的header.html文件像这样链接css:
我不明白为什么css文件没有被加载。 尽管我不确定是否使用正确,我已经尝试使用基础标签。
/
|--index.php
+--includes
|--header.html
+--css
|--style.css
我在主项目文件夹中有两个子文件夹。一个名为“includes”的文件夹,另一个名为“css”的文件夹。 我有以下文件: -
index.php
文件位于主文件夹中
-header.html
位于'main/includes'
文件夹中
-style.css
位于'main/css'
文件夹中我的index.php通过这种方式包含header.html:
include_once('includes/header.html');
(有效!)我的header.html文件像这样链接css:
<link href='../css/style.css' type='text/css' rel='stylesheet'/>
(无效!)我不明白为什么css文件没有被加载。 尽管我不确定是否使用正确,我已经尝试使用基础标签。
<base href="http://localhost/main" />
(无效)