include_once('file_class_a.php');
<? class B { function functionB() { } } $b = new B(); ?>
<? include_once("file_class_b.php"); class A { function functionA() { global $b; b->functionB(); } } $a = new A(); ?>
b->functionB();
Hi persepolis,
Could it be the missing dollar-sign before the object reference :
b->functionB();
Okay, is the code for Class A inside a snippet? If it is, then you will need to define $b as global at snippet level, just before the include_once().