PHP4's support for WindowsCOM

Source: Internet
Author: User
On Windows, PHP4 now supports COM. This means that PHP4 can operate all Windows applications. The COM module in the Microsoft heart structure enables any Windows application to provide a certain number of components and other methods as the starting point to manipulate another application. Several brief SyntaxHighlighter. all ()

On Windows, PHP4 now supports COM.
This means that PHP4 can operate all Windows applications.
The COM module in the Microsoft heart structure enables any Windows application
Provides a certain number of components and other methods to manipulate another
Application entry point.

Several lines of short code may be more effective than detailed descriptions. Next, let's take a look
Example: it starts Word, creates a document, adds text, and saves the disk.

$ Word = new COM ("word. application") or die ("Impossible to instantiate WordApp ");
Print "Word is running, version {$ word-> Version} n
";
$ Word-> Visible = 1;
$ Word-> Documents-> Add ();
$ Word-> Selection-> TypeText ("This is a test ...");
$ Word-> Documents [1]-> SaveAs ("test_com_php.doc ");
$ Word-> Quit ();
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.