Changeset 2772
- Timestamp:
- 08/09/2005 10:38:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-settings.php
r2770 r2772 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 */ 4 16 $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */ 5 6 // Turn register globals off7 if ( ini_get('register_globals') ) {8 $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);9 if ( isset($_SESSION) )10 array_unshift($superglobals, $_SESSION);11 12 foreach ( $superglobals as $superglobal )13 foreach ( $superglobal as $global => $value )14 unset( $GLOBALS[$global] );15 }16 17 17 18 // Fix for IIS, which doesn't set REQUEST_URI
Note: See TracChangeset
for help on using the changeset viewer.