//听说php4也已经支持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();
?>
注意:先用phpinfo()看看你的机器是否打开了com支持.
以上就介绍了在php中如何使用com(仅适合windows系统),包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。