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

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

 



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>

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