COM是M$专用的只能在M$的平台上运行

解决方案 »

  1.   

    你的回答很正确,但是好像和我的问题没有关系!
    调用COM当然是旨在windows系统中的com了.
      

  2.   

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