[TYPO3-german] include von php-files ueber Inhaltselemet php: global geht nicht mehr?
Olivier Dobberkau
olivier.dobberkau at dkd.de
Sun Jan 22 18:49:40 CET 2006
Philipp Flesch schrieb:
> 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
echo funtioniert nicht.
immer nach $content ausgeben.
http://typo3.org/documentation/document-library/doc_core_tsref/PHP_SCRIPT/
besser ist aber.
http://typo3.org/documentation/document-library/doc_core_tsref/USER_and_USER_INT/
olivier
More information about the TYPO3-german
mailing list