cannot recognize class
Posted: Sat Jun 04, 2005 6:05 pm
I get the error : "Fatal error: Cannot instantiate non-existent class".
I call :
$Languages = $FootballEye->GetLanguages();
$FootballEye is known is no problem!
$FootballEye.php:
include("Language.php");
class FootballEye
{
...
function GetLanguages()
{
this->$Languages = new $Languages();
}
Now $Languages is not known while I include Language.php in the top of file $FootballEye.php.
Has anybody an idea? Can I use new in a class?
Why does this not work?
Thanks in advance!
Coen Dunnink
The Netherlands
I call :
$Languages = $FootballEye->GetLanguages();
$FootballEye is known is no problem!
$FootballEye.php:
include("Language.php");
class FootballEye
{
...
function GetLanguages()
{
this->$Languages = new $Languages();
}
Now $Languages is not known while I include Language.php in the top of file $FootballEye.php.
Has anybody an idea? Can I use new in a class?
Why does this not work?
Thanks in advance!
Coen Dunnink
The Netherlands