Re: Register globals and ini_set
| From: | Jason Barnett | Date: | Fri, 08 Jul 2005 13:50:51 +0000 |
| Subject: | Re: Register globals and ini_set | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218347@lists.php.net to get a copy of this message | ||
virtualsoftware@gmail.com wrote:
Hi, If i use, at the beginning of my scripts, ini_set('register_globals', 0), register globals will be turned off? Thanksini_set() just doesn't make sense for that directive. register_globals takes the input data from HTTP requests and sets them in the symbol table before any of your PHP code gets parsed. PHP has already done the work. Doesn't seem too terribly efficient to just throw all of that away on every script invocation, now does it? But what you *can* do, is to ini_get('register_globals') and have your script act accordingly. You could for example extract() your $_GET and $_POST variables. http://php.net/manual/en/function.extract.php -- NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php