>> There are better ways of doing this... <snip> What I always do, is using
absolute paths ('/images/image3.png'), and in some init I define some
constants that contain IMG_DIR, etc, so you can change it in one place.

I wish I could do this but I'm designing a web site creation / management
system  with the ability to pull in files from anywhere as part of its
templating engine. Your solution would work if it a site but I need the
system to be as flexible as possible.

I believe that the solution I proposed earlier: i.e., having an environment
variable (eg. $PHP_CURRENT_INCLUDE or something) contain the path to the
latest included file. That way the included page could decide how it wants
to include other files *and* the variable could be used to link to elements
(eg. images, etc.) in the same directory as the included file. Perhaps there
could even be two variables (along the lines of $PHP_CURRENT_INCLUDE_PATH
and $PHP_CURRENT_INCLUDE_URL), one the path to the include file and the
other an absolute URL (e.g. the file could be included from another server).
These two should cover anything that anyone might possibly want to do in an
included file and offer complete flexibility without having to rewrite any
functions.

Should I submit this as a feature request?

All my best,
Aral :)
______________________________
([EMAIL PROTECTED])
    New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
    Adj. Prof., American University
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ


______________________________
([EMAIL PROTECTED])
    New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
    Adj. Prof., American University
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to