找了很久,終于給我找到!哈哈哈... //聽說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支持.