Re: Problem with new variable system in 4.2

From: Date: Sun, 12 May 2002 18:56:52 +0000
Subject: Re: Problem with new variable system in 4.2
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-97237@lists.php.net to get a copy of this message
thanx, this worked Andy "Philip Olson" <philip@cornado.com> schrieb im Newsbeitrag news:Pine.BSF.4.10.10205121820290.61243-100000@localhost... > > > In php4.1.1 it worked fine. Now I changed the first function to: > > $PATH_INFO = $_SERVER[REQUEST_URI]; (was $PATH_INFO in 4.1.1) > > $PATH_INFO worked fine because register_globals was on > which essentially created $PHP_INFO from $_SERVER['PHP_INFO'] > so how about you do this: > > if (!ini_get('register_globals')) { > extract($HTTP_SERVER_VARS); > } > > So if register_globals = off, $PHP_INFO will exist as will > all web server predefined variables, like $DOCUMENT_ROOT. > > If you are unsure what predefined variable to use, make > a call to phpinfo() and it'll show you exactly what is > available to the script. And print_r() will also be helpful > for various activities too. > > Regards, > Philip Olson >

« previous php.general (#97237) next »