24 Aralık 2008 Çarşamba

Long global vars such as $HTTP_SERVER_VARS, $HTTP_SERVER_VARS in PHP

In some environments $HTTP_SERVER_VARS, like the other long global vars, is null, undefined and does not working.

Since PHP 5.0, it is recommended that one should use $_SERVER instead of $HTTP_SERVER_VARS.

As of PHP 5.0.0, the long PHP predefined variable arrays may be disabled with the register_long_arrays directive.

Similarly,

  • use $_GET instead of $HTTP_GET_VARS
  • use $_POST instead of $HTTP_POST_VARS
  • use $_ENV instead of $HTTP_ENV_VARS
  • use $_COOKIE instead of $HTTP_COOKIE_VARS
  • use $_FILES instead of $HTTP_POST_FILES
  • use $_SESSION instead of $HTTP_SESSION_VARS

For detailed info, look at here: http://www.php.net/manual/nl/reserved.variables.php

Hiç yorum yok: