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

From: Date: Tue, 08 Mar 2005 14:54:57 +0000
Subject: Re: Document root, preferred way to find it???
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-210218@lists.php.net to get a copy of this message
Hello Jochem, Tuesday, March 8, 2005, 3:30:19 AM, you wrote: J> <link rel="stylesheet" type="text/css" title="Site CSS" J> 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

« previous php.general (#210218) next »