Re: register_globals=on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi!

> That's a rather bad way of doing things.

well - i do prefer using $_POST and so on, cause my code gets shorter and
therefor clearly. Furthermore i do not like typing for ages :) (which is not
really a good argument). i would not say that its a bad way, but another way
of doing things. the code-bit provided by peter lavot is useful for newer
progs on elder php-versions which do not support $_GET and so on. So it does
not convert the php-version, but make it possible to use newer codings (as i
said) on elder versions (but this code-bit also only solves the problem of
variable names and not the problem of newer methods which may come with
newer progs).

well - everybody as he/she likes most i think? anyways this does not really
belong to the phpdb-list. *sorry*

.ma


Rasmus Lerdorf <rasmus@lerdorf.com> wrote@26.05.2003 22:43 Uhr:

> On Mon, 26 May 2003, Peter Lovatt wrote:
>> Always code  using $_GET, $_POST etc - its more secure and better practice.
>> 
>> neat bit of code from the php site which converts older versions of php to
>> the new standard
>> 
>> if (!isset($_SERVER))
>> {
>>     $_GET     = &$HTTP_GET_VARS;
>>     $_POST    = &$HTTP_POST_VARS;
>>     $_ENV     = &$HTTP_ENV_VARS;
>>     $_SERVER  = &$HTTP_SERVER_VARS;
>>     $_COOKIE  = &$HTTP_COOKIE_VARS;
>>     $_REQUEST = array_merge($_GET, $_POST, $_COOKIE);
>>     $_FILES  = &$HTTP_POST_FILES;
>> 
>> }
>> 
>> You will find an explanation on php.net at
> 
> That's a rather bad way of doing things.  I leave "S" out of my
> variabes_order for performance reasons, for example.  So I am not going to
> have $_SERVER set and that doesn't tell you anything about my php version.
> 
> -Rasmus
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux