note 22310 deleted from security.registerglobals by philip
| From: | philip@php.net | Date: | Mon, 02 Dec 2002 20:12:56 +0000 |
| Subject: | note 22310 deleted from security.registerglobals by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40266@lists.php.net to get a copy of this message | ||
foreach ($GLOBALS AS $key=>$val)
{
eval("\$$key = '$val';");
}
Does the trick but it also genrates an error. It's better to use the following:
foreach ($GLOBALS AS $key => $val)
{
if ($key != "GLOBALS") {eval("\$$key = '$val';");}
}
Now the problem is realy solved, ofcourse it's best to use the new standard and only get the
vars you need. So you have to rewrite your .php pages. In the mean time this is a workaround.