note 38859 added to language.variables.variable
| From: | m4v3r at o2 dot pl | Date: | Fri, 09 Jan 2004 08:08:49 +0000 |
| Subject: | note 38859 added to language.variables.variable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63186@lists.php.net to get a copy of this message | ||
If you have problem with your script on a server with register_globals off, you can use this code at
the beginning of your script, which will, set up all variables:
<?
foreach($_SESSION AS $key => $value) { ${$key} = $value; }
foreach($_GET AS $key => $value) { ${$key} = $value; }
foreach($_POST AS $key => $value) { ${$key} = $value; }
foreach($_COOKIE AS $key => $value) { ${$key} = $value; }
?>
You might do the same with $_SERVER or $_FILES variables. Hope this'll help someone :).
----
Manual Page -- http://www.php.net/manual/en/language.variables.variable.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38859
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38859&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38859&report=yes
Search -- http://master.php.net/manage/user-notes.php