note 25857 modified in language.variables.external by philip
| From: | philip@php.net | Date: | Sun, 08 Dec 2002 17:17:01 +0000 |
| Subject: | note 25857 modified in language.variables.external by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40529@lists.php.net to get a copy of this message | ||
One method to mimick register_globals being on at runtime is:
if (!ini_get('register_globals')) {
$types_to_register =
array('GET','POST','COOKIE','SESSION','SERVER');
foreach ($types_to_register as $type) {
if (@count(${'HTTP_' . $type . '_VARS'}) > 0) {
extract(${'HTTP_' . $type . '_VARS'}, EXTR_OVERWRITE);
}
}
}
It's not recommended to do this, just rewrite your scripts instead, it's not hard.
--was--
One method to mimick register_globals being on at runtime is:
if (!ini_get('register_globals')) {
$types_to_register =
array('GET','POST','COOKIE','SESSION','SERVER');
foreach ($types_to_register as $type) {
if (@count(${'HTTP_' . $type . '_VARS'}) > 0) {
extract(${'HTTP_' . $type . '_VARS'}, EXTR_OVERWRITE);
}
}
}
http://www.php.net/manual/en/language.variables.external.php