RE: [PHP] Document root, preferred way to find it???
| From: | Chris W. Parker | Date: | Tue, 08 Mar 2005 17:01:21 +0000 |
| Subject: | RE: [PHP] Document root, preferred way to find it??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-210235@lists.php.net to get a copy of this message | ||
Leif Gregory <mailto:Leifg@doh.state.nm.us>
on Tuesday, March 08, 2005 6:55 AM said:
> <link rel="stylesheet" type="text/css" title="Site CSS"
> href="/includes/site.css" />
>
> and I've never placed a period at the beginning.
>
> But you raise an interesting point. Is the server telling the browser
> where the doc root is, or is the browser just guessing by dumping
> everything after the domain name and using what's left as the doc
> root.
The browser is prepending the domain to the path of the css file.
It's the equivalent of:
http(s)://domain.com/includes/sites.css
The browser is looking for the file from the *WEB* root not the
filesystem root. (Forgive me if that is not the proper nomenclature.)
The browser is not doing anything special at all.
Chris.