Changeset 2779
- Timestamp:
- 08/12/2005 07:09:09 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/wp-settings.php
r2771 r2779 1 1 <?php 2 // Turn register globals off 3 if ( ini_get('register_globals') ) { 4 $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET); 5 if ( isset($_SESSION) ) 6 array_unshift($superglobals, $_SESSION); 7 8 foreach ( $superglobals as $superglobal ) 9 foreach ( $superglobal as $global => $value ) 10 if ( 'table_prefix' != $global ) 11 unset( $GLOBALS[$global] ); 12 } 13 2 14 $HTTP_HOST = getenv('HTTP_HOST'); /* domain name */ 3 15 $REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */ … … 12 24 $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; 13 25 } 14 }15 16 // Turn register globals off17 if ( ini_get('register_globals') ) {18 $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);19 if ( isset($_SESSION) )20 array_unshift($superglobals, $_SESSION);21 22 foreach ( $superglobals as $superglobal )23 foreach ( $superglobal as $global => $value )24 unset( $GLOBALS[$global] );25 26 } 26 27
Note: See TracChangeset
for help on using the changeset viewer.