note 23633 added to security.registerglobals
| From: | alight79 at naver dot com | Date: | Wed, 24 Jul 2002 06:12:32 +0000 |
| Subject: | note 23633 added to security.registerglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33464@lists.php.net to get a copy of this message | ||
how about this?
function register_globals_on()
{
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_POST_FILES;
global $HTTP_COOKIE_VARS, $HTTP_SESSION_VARS;
//HTTP_GET_VARS
while (list($key, $val) = @each($HTTP_GET_VARS)) {
$GLOBALS[$key] = $val;
}
//HTTP_POST_VARS
while (list($key, $val) = @each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
}
//HTTP_POST_FILES
while (list($key, $val) = @each($HTTP_POST_FILES)) {
$GLOBALS[$key] = $val;
}
//$HTTP_COOKIE_VARS
while (list($key, $val) = @each($HTTP_COOKIE_VARS)) {
$GLOBALS[$key] = $val;
}
//$HTTP_SESSION_VARS
while (list($key, $val) = @each($HTTP_SESSION_VARS)) {
$GLOBALS[$key] = $val;
}
}
//echo "register_globals on!<br>";
register_globals_on();
--
http://www.php.net/manual/en/security.registerglobals.php
http://master.php.net/manage/user-notes.php?action=edit+23633
http://master.php.net/manage/user-notes.php?action=delete+23633
http://master.php.net/manage/user-notes.php?action=reject+23633