RE: register_globals=on

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

 



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