[eluser]flash866[/eluser]
Code:
<?php
class c1{
var $test;
function __construct(){
$this->test=new efg();
}
}
class efg{
function w(){
echo 'love you!';
}
}
$a=new c1;
$a->c1->w();
?>
But this code is error:
Fatal error: Call to a member function w() on a non-object in C:\Documents and S
ettings\Ltd\My Documents\Noname1.php on line 15
请按任意键继续. . .