Found a MUCH MUCH simpler solution that works across the board.. change
$HTTP_HOST to $DOCUMENT_ROOT and it works!


"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
> Phil:
> On Fri, May 10, 2002 at 08:01:46PM -0400, Phil Powell wrote:
> >
> > How do I fix this problem? I do not want to duplicate the PHP script per
> > folder as there will be an enormous amount of dynamically-created
> > and I will have to copy a version per folder.  I want to be able to use
> > one PHP script in the DOCROOT for every PHP script in every subfolder,
> > is this done?
> Have a file in each directory called, for the sake of example,
> ""  In that file, set a variable called, "$root"  The
> value of it should be the relative path used to find the root
> directory, eg "../../".  This will vary depending on the directory
> depth.  Each script on your site then should have
> "require('./');" at the top.  Now, you'll always know
> where to find the root.  This also makes things easy to move from one
> server to another in the future.
> Another way to do this is to use the auto_prepend_file setting to
> include your file that has the function in it.
> Enjoy,
> --Dan
> --
>                PHP classes that make web design easier
>         SQL Solution  |   Layout Solution   |  Form Solution
>  | |
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to