Re: Document root, preferred way to find it???
| From: | Leif Gregory | Date: | Mon, 07 Mar 2005 02:58:24 +0000 |
| Subject: | Re: Document root, preferred way to find it??? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210128@lists.php.net to get a copy of this message | ||
Hello Marek,
Sunday, March 6, 2005, 7:08:24 PM, you wrote:
>> I don't see where that tells me where the include folder would be.
MK> If you know how the files are layed out in your application, you do.
No... You missed the point of this whole thread which was explained in
point 1 and point 2 of the "Problem" section.
Restated in different words is how do you write some code which is
dynamic enough to withstand reorganization of folders either on the
same host, a different host (maybe with a different OS too), or a
mixture of any.
In HTML, a css declaration as follows:
<link rel="stylesheet" type="text/css" title="Site CSS"
href="includes/site.css" />
works regardless of where the page is, where it's moved to, and
regardless of how many folders down it is as long as there is indeed a
folder off the site root called "includes" and as long as there is a
file in that folder called "site.css".
How do we mimic that capability in PHP so pages don't have to be
re-written if point 1 or point 2 of the "Problem" are met?
Cheers,
Leif Gregory
--
TB Lists Moderator (and fellow registered end-user)
PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F
Web Site <http://www.PCWize.com>