note 70347 added to security.globals
| From: | webmaster at desire2design dot com | Date: | Thu, 12 Oct 2006 15:01:56 +0000 |
| Subject: | note 70347 added to security.globals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118456@lists.php.net to get a copy of this message | ||
For those of you that are lazy, have register_globals defaulted to off and need something quick to
fix scripts that aren't going to be tampered by those amazing haxor guys (or not so amazing
since it's been disabled in php.ini by default) but rather someone that manages houses for a
living...
<?php
foreach ( $_REQUEST as $varname=>$avar ) {
$$varname=$avar;
}
?>
will grab all those nice globals and assign them back into your variables. If your scripts worked
fine before the upgrade, you won't have to worry about clashing of GET and POST variables.
----
Server IP: 212.124.37.9
Probable Submitter: 68.42.124.14
----
Manual Page -- http://www.php.net/manual/en/security.globals.php
Edit -- https://master.php.net/note/edit/70347
Del: integrated -- https://master.php.net/note/delete/70347/integrated
Del: useless -- https://master.php.net/note/delete/70347/useless
Del: bad code -- https://master.php.net/note/delete/70347/bad+code
Del: spam -- https://master.php.net/note/delete/70347/spam
Del: non-english -- https://master.php.net/note/delete/70347/non-english
Del: in docs -- https://master.php.net/note/delete/70347/in+docs
Del: other reasons-- https://master.php.net/note/delete/70347
Reject -- https://master.php.net/note/reject/70347
Search -- https://master.php.net/manage/user-notes.php