On Windows platforms, PHP4
now offers support for COM components. This means that practically
all Windows applications can be manipulated from PHP4. The COM model
at the heart of Microsoft’s architecture is such that any
Windows application can provide a certain number of components and
exposed methods, which are entry points for manipulating
applications from other applications.
A few lines of code tend to be more useful than a long
description, so let’s examine the following example. The code below
does nothing less than boot Word, create a new document from it, add
text to this document, and then save everything on the disk before
quitting.
<?php $word->Visible=1; $word->Documents->Add(); |