php-windows Digest 26 Apr 2004 15:44:07 -0000 Issue 2226

Topics (messages 23543 through 23543):

[Help] Setting the value of COM object's Attribute property
        23543 by: Steven Kidd

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

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

--- End Message ---

Reply via email to