Re: global variable for all scripts

From: Date: Sat, 10 Nov 2001 03:05:42 +0000
Subject: Re: global variable for all scripts
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-69937@lists.php.net to get a copy of this message
Ask support questions at php-general@lists.php.net . You might want to specify some kind of documentroot.php in every directory and use the $GLOBALS array or jus work with the prepend feature (see manual) - Markus On Sat, Nov 10, 2001 at 12:53:09AM +0100, sascha biber wrote : > > hi ppl, > > id like to set something like a global variable or constant. > i need this, to set the path of my document root. all scripts should then > use this path. > > e.g. > my apache document root is: /www > all my skriptfiles are in /www/my_subdir > > i include a special php script in all script files with: > /* > <? include("config/file.php"); > .... > ?> > */ > > if i like to move my scripts to /www/my_newdir i habe to change the > include() function in every script > > any workaround here?

« previous php.dev (#69937) next »