[UPHPU] include() outside root
Timothy Humphrey
timothy.humphrey at gmail.com
Tue Feb 1 08:36:08 MST 2005
Is there a way to include() a file outside the document root from a
file that is referenced in several files, each in a different level of
the directory?
I reread that question and realized that it's hard to understand; so
I'll give an example:
/root/website/backend.php
<? include(../config.php); ?>
/root/website/file_1.php
<? include(backend.php); ?>
/root/website/folder/file_2.php
<? include(../backend.php); ?>
In my experience, file_2.php gives an error finding config.php from
backend.php on line 1.
Thank you.
Timothy
More information about the UPHPU
mailing list