[Help] Setting the value of COM object's Attribute property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,


Any one who has experiences in setting the value of COM object's Attribute property
please help...


The COM runs well in ASP:

<%asp

'The Attribute property specifies and retrieves name-value pairs.
'
'Syntax:
'
'Header.Attribute(bstrName) = String
'String = Header.Attribute(bstrName)
'
'Parameters: bstrName [in] ,String containing the attribute name.
'
'Attribute names are case-sensitive, and both the name and value must be specified in a valid 'XML format. If you duplicate an existing attribute, the earlier attribute is updated.


Dim rid
rid = "0"
Set headobj = Server.CreateObject("Wmrmobjs.WMRMHeader")
headObj.Attribute("RID") = rid

%>


But when I convert it to PHP:



<?php $rid=0; $headObj = new COM("Wmrmobjs.WMRMHeader"); $headObj->Attribute["RID"] = $rid; ?>

There's a Error:

Fatal error: Uncaught exception 'com_exception' with message 'Error Invalid
number of arguments' in D:\server\abc.php:3 Stack trace: #0 {main} thrown in D:\server\abc.php on line 3


I am using PHP 5 RC2.

Thanks.


Stev


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux