new web design - doesn't work

Andreas Pour pour at mieterra.com
Tue Feb 25 19:30:54 UTC 2003


Neil Stevens wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tuesday February 25, 2003 11:17, Dirk Mueller wrote:
> > Hi,
> >
> > apparently there is a problem with the php when register_globals is off.
> > you can see that you have a menu on kate.kde.org (which is on a server
> > with register_globals on) and www.kde.org/info (which is on a server
> > with register globals off).
> >
> > Can somebody of the php gods look into this?
> 
> $DOCUMENT_ROOT doesn't work with globals off.  You have to use
> $_SERVER["DOCUMENT_ROOT"], which of course breaks the use of
> $DOCUMENT_ROOT inside double quotes.

  echo "The root is $_SERVER[DOCUMENT_ROOT].";

should work.  With PHP you can have a single level of indirection inside double
quotes - e.g., the following would *not* work:

  echo "The root is $GLOBALS[_SERVER[DOCUMENT_ROOT]].";

Ciao,

Dre



More information about the kde-www mailing list