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

From: Date: Mon, 26 Apr 2004 15:42:23 +0000
Subject: [Help] Setting the value of COM object's Attribute property
Groups: php.general 
Request: Send a blank email to php-general+get-184667@lists.php.net to get a copy of this 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

« previous php.general (#184667) next »