Re: Document root, preferred way to find it???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jochem,

Tuesday, March 8, 2005, 3:30:19 AM, you wrote:
J> <link rel="stylesheet" type="text/css" title="Site CSS" href="includes/site.css" />

J> I'm pretty sure the url is ./includes/site.css i.e. the include
J> subdir of the dir in which the html file that includes the link tag
J> is in. if you move the html file up or down a dir then the link to
J> the css file will break....

J> maybe browsers are smart enough to also check /includes/site.css


Oops, my bad. I missed the slash in front. I've never run into a
problem using this:

<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. 



-- 
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.2.3 Rush under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux