找了很久,终于给我找到!哈哈哈... //听说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支持.