|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-05-15 07:04 UTC] ws at olapline dot de
here my problem with COM in PHP.
<?
echo "J-Server in der dynamischen PHP-Web-Site. <br><br>";
$jServer = new COM("jexeserver") or DIE ("Connect zum J Server ist nicht
m?glich");
$jServer->Show(1);
$jServer->Log(1);
$jServer->Do("0!:0 <(1!:40''),'system\extras\config\profile.ijs'");
$jServer->Do("load'd:\\j_tm1dll\\j\\tm1api.ijs'");
$jServer->Do("load'd:\\j_tm1dll\\j\\tm1con.ijs'");
$jServer->Do("load'd:\\j_tm1dll\\j\\tm1prop.ijs'");
$jServer->Do("load'd:\\j_tm1dll\\j\\tm1view.ijs'");
$jServer->Do("Tm1On''");
$jServer->Do("Tm1AdmSet'OLAPLINE01'");
$jServer->Do("SrvCon'zeiterf';'Admin';''");
#$jServer->Do("NN=:'XXX'");
$Var = "xxx";
$jServer->SetB("NN", $Var); // In the COM server: NN = $Var
$jServer->Do("NN"); // Display NN in the COM server
$jServer->Do("NN=:'yyy'"); // In the COM server: NN = "yyy"
$jServer->GetB("NN", &$Var); // <=============== There is my problem: (& is a refernce)
// In the COM server &$Var = NN
echo $Var; // echo $Var Output: xxx and not yyy ?!?
$jServer->Quit();
?>
Is there a bug in my code or is this a bug in COM ???
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
> $jServer->GetB("NN", &$Var); pass by reference is deprecated. you have to pack your value into a VARIANT object and unpack it afterwards. $vVar = new VARIANT($Var); /* VARIANT($Var [, VT_BSTR [,CP_ACP]]) */ $jServer->GetB("NN", $vVar); echo $vVar->value; echo $vVar->type; /* one of VT_BSTR, VTUI4, VT_BYREF|VT_*, .... */ btw, in 4.0.5 the com extension is not working properly, maybe you have to wait for 4.0.6 (or use the -dev version)