首頁 >後端開發 >php教程 >COM in PHP (winows only)_PHP教程

COM in PHP (winows only)_PHP教程

WBOY
WBOY原創
2016-07-21 16:01:22938瀏覽

找了很久,終於給我找到!哈哈哈...  
//聽說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";>print "Loaded >$word->Visible = 1;   
$word->Documents->Add();   
$word->Selection->TypeText("This is a test...");   
$ word->Documents[1]->SaveAs("Useless test.doc");   
$word->Quit();   
?>  
注意:先用phpinfo()看看你的機器看看你的機器是否開啟了COM支援.  

http://www.bkjia.com/PHPjc/316877.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316877.htmlTechArticle找了很久,終於找到!哈哈哈... //聽說php4也已經支援Java/ EJB的說. ? // this script is come from zend. :) $word = new COM(word.application) or die(Unable to ins...
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn