You are here: Re: Unusual behaviour opening Word document « PHP Programming Language « IT news, forums, messages
Re: Unusual behaviour opening Word document

Posted by Alvaro G. Vicario on 07/24/06 19:38

*** Csaba Gabor escribió/wrote (24 Jul 2006 05:27:59 -0700):
> <?php
> $path = "c:\\path\\to\\word\\document\\mydoc.doc";
> $doc = new COM($path);
> $doc->Application->visible = true;
> ?>

According to PHP manual, COM constructor doesn't expect a file name:

com COM::COM ( string module_name [, mixed server_name [, int codepage [,
string typelib]]] )

module_name
Can be a ProgID, Class ID or Moniker that names the component to load.

A ProgID is typically the application or DLL name, followed by a period,
followed by the object name. e.g: Word.Application.

A Class ID is the UUID that uniquely identifies a given class.

A Moniker is a special form of naming, similar in concept to a URL scheme,
that identifies a resource and specifies how it should be loaded. As an
example, you could load up Word and get an object representing a word
document by specifying the full path to the word document as the module
name, or you can use LDAP: as a moniker to use the ADSI interface to LDAP.



In my computer, the code just crashes PHP interpreter.


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация