224
Bearbeitungen
Zeile 1: | Zeile 1: | ||
== Was ändert sich im Programmcode? == | |||
'alter' Code / 'neuer' Code: | |||
* betroffen $HTTP_XXXX_VARS | |||
alt: $HTTP_GET_VARS['img'] | |||
neu: $_GET['img'] | |||
alt: $HTTP_POST_VARS['password'] | |||
neu: $_POST['password'] | |||
* betroffen SERVER-Variablen und Environment | |||
alt: $DOCUMENT_ROOT | |||
neu: $_SERVER['DOCUMENT_ROOT'] | |||
alt: $PHP_SELF | |||
neu: $_SERVER['PHP_SELF'] | |||
alt: $HOME | |||
neu: $_ENV['HOME'] | |||
== Anwendungsbeispiele == | |||
alt: undefinierter index in array | |||
$do = $_GET['do']; | |||
if ($do == 'verify') | |||
[...] | |||
neu: abfragen ob array-element existiert, ggf. initialisieren | |||
if (!empty($_GET['do'])) | |||
$do = $_GET['do']; | |||
else | |||
$do = ""; | |||
if ($do == 'verify') | |||
[...] | |||
== Usefull Links: == | |||
* http://www.html.de/tutorials/7464-php-register_globals-hat-es-damit-auf-sich.html | * http://www.html.de/tutorials/7464-php-register_globals-hat-es-damit-auf-sich.html | ||
* http://www.phpbar.de/w/Register_globals | * http://www.phpbar.de/w/Register_globals |