WEB开发网
开发学院WEB开发PHP COM in PHP (winows only) 阅读

COM in PHP (winows only)

 2000-12-20 11:41:21 来源:WEB开发网   
核心提示:找了很久,终于给我找到!哈哈哈...//听说php4也已经支持java/EJB的说.<?// this script is come from zend. :)$Word = new COM("word.application") or die("Unable to instanci
找了很久,终于给我找到!哈哈哈... 
//听说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支持. 

Tags:COM in PHP

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接