moin
datei test.php
datei test2.php
wenn ich test.php aufrufe geht alles wunderbar
wenn ich test2.php aufrufe kennt er die globale variable nichtmehr...
bitte mal um hilfe... ich brauch das genau so wies da steht.
danke schonmal
datei test.php
PHP Code:
<?
$test = 'test';
class blubb
{
function bla()
{
global $test;
echo $test;
}
}
$c = new blubb;
$c->bla();
?>
PHP Code:
<?
class irgendwas
{
function tra()
{
include('test.php');
}
}
$tt = new irgendwas();
$tt->tra();
?>
wenn ich test.php aufrufe geht alles wunderbar
wenn ich test2.php aufrufe kennt er die globale variable nichtmehr...
bitte mal um hilfe... ich brauch das genau so wies da steht.
danke schonmal
Comment