Re: IIS and COM
| From: | Alain Samoun | Date: | Fri, 18 Aug 2000 20:14:20 +0000 |
| Subject: | Re: IIS and COM | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1975@lists.php.net to get a copy of this message | ||
Zeev:
Kudo for the COM class name! it makes it very easy to use COM objects with
PHP4.
Though that so far I did not have to use it, I 've problems with
com_get() and com_set() functions in PHP4.02. Does it work?
Alain
On Fri, Aug 18, 2000 at 10:10:00PM +0300, Zeev Suraski wrote:
> No, com_invoke() is simply the old (PHP 3) way of doing what the OO
> interface of PHP 4 gives you transparently. You never need to use
> com_invoke() in PHP 4.
>
> Zeev
>
> On Fri, 18 Aug 2000, Andy Hoffman wrote:
>
> > Matthew Podwysocki wrote:
> >
> > > Warning: Invoke() failed: No description available in
> > > D:\webroot\lib\comtest.php on line 11
> > >
> > > Warning: Invoke() failed: Exception occurred. in D:\webroot\lib\comtest.php
> > > on line 13
> > >
> > > The lines it is talking about is:
> > > $word->Documents->Add();
> > > and
> > > $word->Documents[1]->SaveAs("Useless test.doc");
> > >
> > > Can someone shed some light on this? Thanks!
> > > Matt Podwysocki
> >
> > Looks like you need to use the com_invoke() function to call methods of the
> > instantiated COM object... while you can get at the properties like
> > $word->Version, try this to access the methods after instantiating object...
> >
> > com_invoke($word, "Document.Add");
> > com_invoke($word,"Documents[1].SaveAs","Usless_test.doc");
> >
> > Mind you, I've never tried these, it's just a guess. Basing this on BASIC
> > information on php.net - the COM methods are not well documented.
> >
> > http://www.php.net/manual/ref.com.php
> >
> > --
> > Andy Hoffman
> > Web Developer
> > Bristol-Myers Squibb
> > email: andy.hoffman@bms.com
> >
> >
> >
>
> --
> Zeev Suraski <zeev@zend.com>
> http://www.zend.com/
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net