【发布时间】:2009-11-13 21:12:28
【问题描述】:
这是我的目录结构:
-根
--文档
---doc1.php
--包括
---header.php
---footer.php
---css.css
--index.php
在我的标题中,我像这样链接到我的 CSS 文件:
<link href="includes/styling.css" type="text/css" rel="stylesheet" />
这适用于 index.php,因为它是正确的路径 (root/includes/css.css)。
但对于 doc1.php,这不是正确的路径。 (root/docs/includes/css.css)。
如何在保留一个包含该行代码的 header.php 文件的同时解决此问题?有没有办法强制路径从根目录开始?
【问题讨论】:
-
将您的 html 标签放入代码块中。