Home > Backend Development > PHP Tutorial > COM in PHP (winows only)_PHP tutorial

COM in PHP (winows only)_PHP tutorial

WBOY
Release: 2016-07-21 16:01:22
Original
944 people have browsed it

After searching for a long time, I finally found it! Hahaha...
//I heard that php4 also supports Java/EJB.
// this script is come from zend. : )
$word = new COM("word.application") or die("Unable to instanciate Word
");
print "Loaded Word, version {$word->Version}n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test... ");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>
Note : First use phpinfo() to see if your machine has COM support turned on.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316877.htmlTechArticleAfter looking for a long time, I finally found it! Hahaha... //I heard that php4 also supports Java/ EJB said. ? // this script is come from zend. :) $word = new COM(word.application) or die(Unable to ins...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template