You are here: Re: [PHP] Document root, preferred way to find it??? « PHP « IT news, forums, messages
Re: [PHP] Document root, preferred way to find it???

Posted by Leif Gregory on 03/08/05 16:54

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация