|
Posted by Jerry Stuckle on 11/14/07 13:11
Alex wrote:
> Hello,
>
> I'm trying to use a (remote) COM object from a PHP script (4.4, server has
> apache2 win32).
>
> The basics seem to work : I instantiate the COM object ($o = new COM"..."),
> then I use two of the objects methods to authenticate. In the meantime a
> property called "ProjectConnected", passes from 0 to 1. So I think the
> object is correctly instanciated and the connection works.
>
> But now, I'm doing a var_dump on my object and I get this :
> object(COM)(1) {
> [0]=> resource(127) of type (COM)
> }
>
> Arg. I don't understand this and the PHP manual doesnt help either. I would
> have expected to get a list of methods/properties. At least the two I use to
> authenticate.
>
> var_dump ($obj[0]) returns null.
>
>
> Could someone explain me more about this ?
>
> Thanks,
This is correct; this is an external resource in PHP.
AFAIK, the only way you can get a list of properties and methods of a
COM object is if the COM object itself supports such a request.
And the resource object in PHP isn't an array, which is why you get null
when you try to dump $obj[0].
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|