You are here: Re: Register globals and ini_set « PHP « IT news, forums, messages
Re: Register globals and ini_set

Posted by Jason Barnett on 07/08/05 16:50

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?
>
> Thanks

ini_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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация