Hello all
I'm trying to include some files in an included file. Think of some scripts
like this
/index.php
/scripts/logging.php
/scripts/config.php
/scripts/db_access.php
index.php includes 'scripts/logging.php' and logging.php includes
'config.php' ºi 'db_access.php' .
My problem is that from within logging.php the php will try to include the
file '/config.php' and not '/scripts/config.php' because logging.php is
included in '/index.php' in the first place.
I would use absolute paths in the included file names, built with
$_SERVER['DOCUMENT_ROOT'], but I don't really know where my pages are on
the web server. I just know they are somewhere under DocumentRoot.
How can I write pages that can translate local paths to virtual paths and
that can be moved from one place to another in the virtual directory
hierarhy and still function corectly ?
How can I write pages that know about each other's URI's and that do not
care where they are placed on the webserver with respect to DocumentRoot ?
--
Thank you
Timothy Madden
Romania
------------------------------------
And I don't wanna miss a thing
Comment