简体   繁体   中英

COM instance (invoked from PHP)

$XL = new COM("Excel.Application");

...creates a new instance of Excel.

But I want to interact with an existing one. (In the olden days, Microsoft VB term of art was GetObject() vis-à-vis CreateObject().)

PHP is being instructed in the statement above to do the equivalent of CreateObject(). How can it be instructed to do GetObject() instead?

Thanks for any help.

I think this could be what you are looking for, but this is hte function style code, not the OOP style code:

http://www.php.net/manual/en/function.com-get-active-object.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM