【发布时间】:2013-03-29 18:18:13
【问题描述】:
我的 Apache Web 服务器根目录设置为“C:\webserver\webroot\AptanaProjects”
我希望能够在不输入绝对引用的情况下引用样式表,因为我使用 FTP 上传到网站。
The http://localhost/MovieDatabase/index.php file refers to http://localhost/MovieDatabase/styles/main.css
using:
<link rel="stylesheet" href="/styles/main.css" type="text/css">
这行不通,因为显然我没有包含路径的 MovieDatabase 部分。
我该如何解决这个问题以避免输入绝对路径?我不想将网络服务器根目录更改为 MovieDatabase,因为我有多个项目。
谢谢。
【问题讨论】:
标签: php html web absolute-path rel