Hi guys,
seems I can use some help with this. I am currently trying re-do an ASP VBScript application in PHP and encounter some probs. I need to use a custom DCOM application which is generally working fine but can't seem to get round these 2 problems (in case you wonder, it's a database-ish application):
1) I need to set a property in one of the objects and go like this:
$myObject = new COM("myObject.1");
//assign my connection
$myObject->connection = $myConnection;
//set name for the requested DB
$myObject->database = "myDB";
The above works fine for PHP 4.0.6, if i use the current 4.2.x the php.exe crashes when I assign this property. So I tried this instead, because I think it should be similar to the above:
$bVar=com_set($myobject,"database","myDB");
but I constantly get errors (Unable to lookup database: Unknown name) Apparently the property cannot be found:What do I do wrong? As i said, it's fine with 4.0.6
2) My second problem is that I need to call a method that looks like this in VBScript:
for i=0 to iMax
myObject.Index(i)=szSomeValue
next
So I first thought the PHP version could be like this:
for ($i=0;$i<$iMax;$i++)
{
$myObject->Index($i)=$szSomeValue;
}
Of course the parser didn't like it like that, and I used square brackets, but since I am calling a method and not an array it doesn't give me the desired results...
Can anyone help, I am <b>DESPERATE</b>
Thanks million,
Tbug