[TYPO3-german] include von php-files ueber Inhaltselemet php: global geht nicht mehr?

Philipp Flesch Philipp at phflesch.de
Sun Jan 22 18:45:48 CET 2006


Hallo!

Ich habe da ein kleines Problem:
Ich habe als Inhaltselement folgenden Code:
<?
 include ("fileadmin/scripte/global_test.php");
?>

global_test.php ist ein Beispiel von php.net
<?
$a = 5;
$b = 2;

function Summe($test,$test2)
{
   global $a, $b;

   $c = $a + $b;
   $b = $c;
   echo $c." - ";
}

Summe(1,2);
echo $b;
?>

So weit so gut.
Eingebaut in Contendio liefert es das gewuenschte Ergebnis (7 - 7).
Included in eine include_test.php auch.
Nur in Typo3 liefert er mir (0 - 2)

Das zeigt mir aber, dass er irgendwie in Typo3 die global Variablen nicht mehr
auswertet. Ich braeuchte sie aber dringend! Und nun?

Danke schon einmal und liebe Gruesse

Philipp
~




More information about the TYPO3-german mailing list