ID:               28161
 Updated by:       [EMAIL PROTECTED]
 Reported By:      spymail at 21cn dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         COM related
 Operating System: Windows 2000
 PHP Version:      5.0.0RC1
 New Comment:

Did you try RC2 ?

Can you please paste the IDL for the COM object here,
as I don't have that COM object to test against.



Previous Comments:
------------------------------------------------------------------------

[2004-04-26 18:00:47] spymail at 21cn dot com

Description:
------------


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,there's a fatal error.



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

Expected result:
----------------
The Attribute should be set.

Actual result:
--------------
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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28161&edit=1

Reply via email to