czy moglibyscie mi powiedziec dlaczego kod:
[php:1:1e0113cc4a]<?php
class test
{
function testing()
{
print "OLABOGA";
}
}
class nowa
{
function nic()
{
$test -> testing();
}
}
class engine
{
var $test;
var $nowa;
function engine()
{
$this -> test = new test;
$this -> test -> testing();
$this -> nowa = new nowa;
$this -> nowa -> nic();
}
}
$engine = new engine();
?>[/php:1:1e0113cc4a]
zwraca blad:
Cytat
Call to a member function on a non-object

Czy zawsze trzeba przekazywac obiekty przez tablice $_GLOBALS ? A moze jakos inaczej? Dzieki.