Posted by Markus Ernst on 10/11/03 11:56
Rik schrieb:
>> require_once("clsTestObject.php");
>> $objTestObject = new clsTestObject;
>>
>> do_test_var();
>>
>> function do_test_var()
>> {
>
>
> You either need:
> global $objTestObject;
>
>
>> $objTestObject->ShowTestVar();
>> $objTestObject->SetTestVar();
>> $objTestObject->ShowTestVar();
>
>
> OR:
> $GLOBALS['objTestObject']->ShowTestVar();
> $GLOBALS['objTestObject']->SetTestVar();
> $GLOBALS['objTestObject']->ShowTestVar();
>
>
>> }
or:
do_test_var($objTestObject);
function do_test_var(&$object)
{
$object->ShowTestVar();
$object->SetTestVar();
$object->ShowTestVar();
}
HTH
Markus
Navigation:
[Reply to this message]
|