mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Tweak
git-svn-id: http://svn.automattic.com/wordpress/trunk@2772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2919fe2956
commit
376ec4dce5
@ -1,8 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
|
|
||||||
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
|
||||||
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
|
||||||
|
|
||||||
// Turn register globals off
|
// Turn register globals off
|
||||||
if ( ini_get('register_globals') ) {
|
if ( ini_get('register_globals') ) {
|
||||||
$superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
|
$superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
|
||||||
@ -11,9 +7,14 @@ if ( ini_get('register_globals') ) {
|
|||||||
|
|
||||||
foreach ( $superglobals as $superglobal )
|
foreach ( $superglobals as $superglobal )
|
||||||
foreach ( $superglobal as $global => $value )
|
foreach ( $superglobal as $global => $value )
|
||||||
|
if ( 'table_prefix' != $global )
|
||||||
unset( $GLOBALS[$global] );
|
unset( $GLOBALS[$global] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
|
||||||
|
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
|
||||||
|
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
|
||||||
|
|
||||||
// Fix for IIS, which doesn't set REQUEST_URI
|
// Fix for IIS, which doesn't set REQUEST_URI
|
||||||
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
if ( empty( $_SERVER['REQUEST_URI'] ) ) {
|
||||||
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
|
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; // Does this work under CGI?
|
||||||
|
Loading…
Reference in New Issue
Block a user